Mercurial > hg > Members > tatsuki > bench > jungle-core
view src/test/java/jp/ac/u_ryukyu/ie/cr/shoshi/jungle/impl/clonable/NodePathCompareTest.java @ 138:b998fdc99bc0
add NodePathCompare and Test
author | one |
---|---|
date | Mon, 27 Oct 2014 19:04:59 +0900 |
parents | |
children |
line wrap: on
line source
package jp.ac.u_ryukyu.ie.cr.shoshi.jungle.impl.clonable; import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.store.NodePath; import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.store.impl.DefaultNodePath; import junit.framework.Assert; import org.junit.Test; public class NodePathCompareTest { @Test public void NodePathCompare(){ NodePath path = new DefaultNodePath(); path = path.add(0).add(1).add(2); System.out.println(path.toString()); NodePath comparePath1 = new DefaultNodePath(); comparePath1 = comparePath1.add(0).add(1).add(2).add(3); NodePath comparePath2 = new DefaultNodePath(); comparePath2 = comparePath2.add(0).add(1); NodePath comparePath3 = new DefaultNodePath(); comparePath3 = comparePath3.add(1).add(1).add(2).add(3); Assert.assertTrue(path.compare(comparePath1)); Assert.assertFalse(path.compare(comparePath2)); Assert.assertFalse(path.compare(comparePath3)); } }