Mercurial > hg > Members > nobuyasu > jungle-network
changeset 10:5376ac62ac08
modified TestCodeSegment
author | one |
---|---|
date | Mon, 24 Jun 2013 20:40:59 +0900 |
parents | 49c0eaa4dce2 |
children | c9ff68c4d82f |
files | src/jungle/test/codesegment/practice/StartCodeSegment.java src/jungle/test/codesegment/practice/TestCodeSegment.java |
diffstat | 2 files changed, 9 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/src/jungle/test/codesegment/practice/StartCodeSegment.java Tue Jun 11 14:09:42 2013 +0900 +++ b/src/jungle/test/codesegment/practice/StartCodeSegment.java Mon Jun 24 20:40:59 2013 +0900 @@ -31,13 +31,14 @@ DefaultNodePath nodePath1 = new DefaultNodePath(); nodePath1 = nodePath1.add(1); DefaultNodePath nodePath2 = nodePath1.add(2); - AppendChildAtOperation appendChildOp = new AppendChildAtOperation(1); + AppendChildAtOperation appendChildOp1 = new AppendChildAtOperation(1); + AppendChildAtOperation appendChildOp2 = new AppendChildAtOperation(2); PutAttributeOperation putOp = new PutAttributeOperation(key, b); DeleteAttributeOperation deleteOp = new DeleteAttributeOperation("hoge"); DeleteChildAtOperation deleteChild = new DeleteChildAtOperation(2); List<TreeOperation> list = new LinkedList<TreeOperation>(); - list.add(new DefaultTreeOperation(nodePath1, appendChildOp)); - list.add(new DefaultTreeOperation(nodePath2, appendChildOp)); + list.add(new DefaultTreeOperation(new DefaultNodePath(), appendChildOp1)); + list.add(new DefaultTreeOperation(nodePath1, appendChildOp2)); list.add(new DefaultTreeOperation(nodePath2, putOp)); list.add(new DefaultTreeOperation(nodePath2, deleteOp)); list.add(new DefaultTreeOperation(nodePath1, deleteChild));
--- a/src/jungle/test/codesegment/practice/TestCodeSegment.java Tue Jun 11 14:09:42 2013 +0900 +++ b/src/jungle/test/codesegment/practice/TestCodeSegment.java Mon Jun 24 20:40:59 2013 +0900 @@ -5,6 +5,7 @@ import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.store.Command; import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.store.NodePath; +import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.store.impl.DefaultNodePath; import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.store.impl.logger.TreeOperationLog; import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.store.operations.NodeOperation; import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.store.operations.TreeOperation; @@ -30,10 +31,9 @@ MessagePack msgpack = new MessagePack(); Value logContainerValue = (Value) arg1.getVal(); - DefaultTreeOperationLogContainer convertedLogContainer; TreeOperationLog convertedLog = null; try { - convertedLogContainer = msgpack.convert(logContainerValue, DefaultTreeOperationLogContainer.class); + DefaultTreeOperationLogContainer convertedLogContainer = msgpack.convert(logContainerValue, DefaultTreeOperationLogContainer.class); convertedLog = convertedLogContainer.convert(); } catch (IOException e) { e.printStackTrace(); @@ -70,9 +70,11 @@ for (int i: path ) { System.out.println(i); } - } + + + System.exit(0); /*