Mercurial > hg > Members > nobuyasu > jungle-network
changeset 70:892bac9ac118
Modified NetworkAppendChildAtOperation
author | one |
---|---|
date | Fri, 11 Oct 2013 18:23:58 +0900 |
parents | 0cb55616b76e |
children | f1aef52c0611 |
files | src/jungle/test/operations/messagepack/PackOperationLog.java src/test/alice/jungle/datasegment/NetworkNodePathTest.java |
diffstat | 2 files changed, 6 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/src/jungle/test/operations/messagepack/PackOperationLog.java Thu Oct 10 22:19:33 2013 +0900 +++ b/src/jungle/test/operations/messagepack/PackOperationLog.java Fri Oct 11 18:23:58 2013 +0900 @@ -12,7 +12,7 @@ import org.msgpack.MessagePack; import org.msgpack.type.Value; -import alice.jungle.operations.NetworkNodeOperation; +import alice.jungle.operations.NetworkAppendChildAtOperation; import alice.jungle.operations.NetworkNodePath; import alice.jungle.operations.NetworkTreeOperationLog; @@ -24,11 +24,9 @@ NetworkNodePath p = new NetworkNodePath(); p = p.add(1).add(2).add(3); System.out.println(p.toString()); - NetworkTreeOperationLog n2 = n.add(p, new NetworkNodeOperation()); + NetworkTreeOperationLog n2 = n.add(p, new NetworkAppendChildAtOperation(1)); System.out.println("n.length() = "+n.length()); - NetworkTreeOperationLog n3 = n2.append(new NetworkTreeOperationLog()); - Value v = msgpack.unconvert(n2); final NetworkTreeOperationLog log = msgpack.convert(v, NetworkTreeOperationLog.class); @@ -43,6 +41,7 @@ NodePath nPath = op.getNodePath(); NodeOperation nodeOp = op.getNodeOperation(); Command c = nodeOp.getCommand(); + System.out.println("Command : "+ c.toString()); System.out.println(nPath.toString()); } }
--- a/src/test/alice/jungle/datasegment/NetworkNodePathTest.java Thu Oct 10 22:19:33 2013 +0900 +++ b/src/test/alice/jungle/datasegment/NetworkNodePathTest.java Fri Oct 11 18:23:58 2013 +0900 @@ -11,7 +11,6 @@ public class NetworkNodePathTest extends TestCase { - public void testMsgpackConvert() throws IOException { NetworkNodePath path = new NetworkNodePath(); path = path.add(1).add(2).add(3); @@ -27,6 +26,7 @@ assertEquals(i1, i2); } } - - + + + }