138
|
1 package jp.ac.u_ryukyu.ie.cr.shoshi.jungle.impl.clonable;
|
|
2
|
|
3 import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.store.NodePath;
|
|
4 import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.store.impl.DefaultNodePath;
|
|
5 import junit.framework.Assert;
|
|
6
|
|
7 import org.junit.Test;
|
|
8
|
|
9 public class NodePathCompareTest {
|
|
10
|
|
11 @Test
|
|
12 public void NodePathCompare(){
|
|
13 NodePath path = new DefaultNodePath();
|
|
14 path = path.add(0).add(1).add(2);
|
|
15 System.out.println(path.toString());
|
|
16
|
|
17 NodePath comparePath1 = new DefaultNodePath();
|
|
18 comparePath1 = comparePath1.add(0).add(1).add(2).add(3);
|
|
19
|
|
20 NodePath comparePath2 = new DefaultNodePath();
|
|
21 comparePath2 = comparePath2.add(0).add(1);
|
|
22
|
|
23 NodePath comparePath3 = new DefaultNodePath();
|
|
24 comparePath3 = comparePath3.add(1).add(1).add(2).add(3);
|
|
25
|
|
26 Assert.assertTrue(path.compare(comparePath1));
|
|
27 Assert.assertFalse(path.compare(comparePath2));
|
|
28 Assert.assertFalse(path.compare(comparePath3));
|
|
29 }
|
|
30 }
|