nodal-cvs Mailing List for NODAL (Page 5)
Status: Pre-Alpha
Brought to you by:
leei
You can subscribe to this list here.
2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(69) |
Jun
(153) |
Jul
(129) |
Aug
(70) |
Sep
(94) |
Oct
(105) |
Nov
(31) |
Dec
(34) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2003 |
Jan
(7) |
Feb
(40) |
Mar
(68) |
Apr
(27) |
May
(107) |
Jun
(202) |
Jul
(74) |
Aug
(5) |
Sep
(25) |
Oct
(40) |
Nov
(43) |
Dec
(73) |
2004 |
Jan
(63) |
Feb
(40) |
Mar
(104) |
Apr
(34) |
May
(33) |
Jun
(18) |
Jul
(12) |
Aug
(2) |
Sep
(24) |
Oct
(52) |
Nov
(44) |
Dec
(4) |
2005 |
Jan
(42) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2007 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2008 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2009 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2011 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(3) |
Jun
|
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
|
2013 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
(5) |
Jun
|
Jul
|
Aug
(6) |
Sep
(3) |
Oct
|
Nov
|
Dec
(1) |
2014 |
Jan
|
Feb
(1) |
Mar
(1) |
Apr
(1) |
May
|
Jun
(1) |
Jul
|
Aug
(1) |
Sep
(6) |
Oct
(5) |
Nov
(8) |
Dec
(3) |
2015 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2016 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
(2) |
Dec
|
2017 |
Jan
|
Feb
|
Mar
(1) |
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Lee I. <le...@us...> - 2004-10-06 22:21:50
|
Update of /cvsroot/nodal/nodal/j-src/test/org/nodal/schemata/text/xml In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30023/test/org/nodal/schemata/text/xml Removed Files: TestXML.java Log Message: Remove files reseated in j-test --- TestXML.java DELETED --- |
From: Lee I. <le...@us...> - 2004-10-06 22:21:50
|
Update of /cvsroot/nodal/nodal/j-src/org/nodal/implementation/memory In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30023/org/nodal/implementation/memory Removed Files: memory.dfPackage TypeImpl.java Log Message: Remove files reseated in j-test --- memory.dfPackage DELETED --- --- TypeImpl.java DELETED --- |
From: Lee I. <le...@us...> - 2004-10-06 22:21:50
|
Update of /cvsroot/nodal/nodal/j-src/test/storage/jar In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30023/test/storage/jar Removed Files: Suite.java TestJarRepository.java Log Message: Remove files reseated in j-test --- Suite.java DELETED --- --- TestJarRepository.java DELETED --- |
From: Lee I. <le...@us...> - 2004-10-06 22:21:50
|
Update of /cvsroot/nodal/nodal/j-src/.externalToolBuilders In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30023/.externalToolBuilders Added Files: Create JAR.launch Log Message: Remove files reseated in j-test --- NEW FILE: Create JAR.launch --- <?xml version="1.0" encoding="UTF-8"?> <launchConfiguration type="org.eclipse.ant.AntBuilderLaunchConfigurationType"> <booleanAttribute key="org.eclipse.debug.ui.ATTR_LAUNCH_IN_BACKGROUND" value="false"/> <booleanAttribute key="org.eclipse.jdt.launching.DEFAULT_CLASSPATH" value="true"/> <stringAttribute key="org.eclipse.ui.externaltools.ATTR_RUN_BUILD_KINDS" value="full,incremental,auto,"/> <stringAttribute key="org.eclipse.ui.externaltools.ATTR_WORKING_DIRECTORY" value="${workspace_loc:/j-src}"/> <intAttribute key="org.eclipse.ui.externaltoolsATTR_SORT_TARGETS" value="1"/> <stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION" value="${workspace_loc:/j-src/build.xml}"/> <booleanAttribute key="org.eclipse.debug.core.appendEnvironmentVariables" value="true"/> <stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="org.eclipse.ant.ui.AntClasspathProvider"/> <stringAttribute key="org.eclipse.ui.externaltools.ATTR_ANT_TARGETS" value="jar,"/> </launchConfiguration> |
From: Lee I. <le...@us...> - 2004-10-06 22:21:47
|
Update of /cvsroot/nodal/nodal/j-src/test/storage/memory In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30023/test/storage/memory Removed Files: TestmemMapContent.java TestmemGenericSequenceContent.java TestPaths.java TestBareSequence.java TestmemIntSequenceContent.java TestmemStringContent.java memory.dfPackage Suite.java TestmemOperator.java Log Message: Remove files reseated in j-test --- TestmemGenericSequenceContent.java DELETED --- --- memory.dfPackage DELETED --- --- TestmemStringContent.java DELETED --- --- TestPaths.java DELETED --- --- Suite.java DELETED --- --- TestmemIntSequenceContent.java DELETED --- --- TestBareSequence.java DELETED --- --- TestmemMapContent.java DELETED --- --- TestmemOperator.java DELETED --- |
From: Lee I. <le...@us...> - 2004-10-06 22:21:46
|
Update of /cvsroot/nodal/nodal/j-src/test/org/nodal/nav In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30023/test/org/nodal/nav Removed Files: TestPathDifference.java TestPaths.java nav.dfPackage Suite.java Log Message: Remove files reseated in j-test --- TestPaths.java DELETED --- --- Suite.java DELETED --- --- TestPathDifference.java DELETED --- --- nav.dfPackage DELETED --- |
From: Lee I. <le...@us...> - 2004-10-06 22:21:44
|
Update of /cvsroot/nodal/nodal/j-src/test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30023/test Removed Files: test.dfPackage Suite.java Log Message: Remove files reseated in j-test --- Suite.java DELETED --- --- test.dfPackage DELETED --- |
From: Lee I. <le...@us...> - 2004-10-06 22:21:43
|
Update of /cvsroot/nodal/nodal/j-src/test/storage In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30023/test/storage Removed Files: storage.dfPackage Suite.java Log Message: Remove files reseated in j-test --- Suite.java DELETED --- --- storage.dfPackage DELETED --- |
From: Lee I. <le...@us...> - 2004-10-06 22:21:43
|
Update of /cvsroot/nodal/nodal/j-src/test/org/nodal/storage In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30023/test/org/nodal/storage Removed Files: storage.dfPackage Log Message: Remove files reseated in j-test --- storage.dfPackage DELETED --- |
From: Lee I. <le...@us...> - 2004-10-06 22:21:42
|
Update of /cvsroot/nodal/nodal/j-src/test/storage/file In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30023/test/storage/file Removed Files: TestFileRepository.java Suite.java Log Message: Remove files reseated in j-test --- Suite.java DELETED --- --- TestFileRepository.java DELETED --- |
From: Lee I. <le...@us...> - 2004-10-06 22:21:41
|
Update of /cvsroot/nodal/nodal/j-src/test/org/nodal/storage/memory In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30023/test/org/nodal/storage/memory Removed Files: TestmemRecordContent.java TestmemMapHead.java TestmemRepository.java TestmemRecordHead.java TestmemMapContent.java memory.dfPackage TestmemGenericSequenceContent.java TestmemSequenceHead.java Log Message: Remove files reseated in j-test --- TestmemGenericSequenceContent.java DELETED --- --- memory.dfPackage DELETED --- --- TestmemSequenceHead.java DELETED --- --- TestmemRepository.java DELETED --- --- TestmemRecordHead.java DELETED --- --- TestmemMapHead.java DELETED --- --- TestmemRecordContent.java DELETED --- --- TestmemMapContent.java DELETED --- |
From: Lee I. <le...@us...> - 2004-10-06 22:21:40
|
Update of /cvsroot/nodal/nodal/j-src/test/storage/http In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30023/test/storage/http Removed Files: TestHttpRepository.java Suite.java Log Message: Remove files reseated in j-test --- Suite.java DELETED --- --- TestHttpRepository.java DELETED --- |
From: Lee I. <le...@us...> - 2004-10-06 22:18:30
|
Update of /cvsroot/nodal/j-test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29200 Modified Files: .project Added Files: build.xml decText.txt Log Message: Updates to enable unit tests inside/outside of Eclipse. --- NEW FILE: decText.txt --- Line 1 Line 2 Line 3 Index: .project =================================================================== RCS file: /cvsroot/nodal/j-test/.project,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** .project 3 Oct 2004 19:42:25 -0000 1.1 --- .project 6 Oct 2004 22:18:20 -0000 1.2 *************** *** 4,7 **** --- 4,8 ---- <comment></comment> <projects> + <project>j-src</project> </projects> <buildSpec> --- NEW FILE: build.xml --- <?xml version="1.0" encoding="UTF-8" standalone="yes" ?> <!-- - - Distributed under the Apache Software License, Version 1.1 - (see the file LICENSE for terms and conditions) - - Copyright (c) 2001 SRI International. All rights reserved. - --> <project name="nodal" default="compile" basedir="."> <!-- set global properties for this build --> <property name="src" value="src" /> <property name="testincludes" value="test/**/*.java" /> <property name="testexcludes" value="test/org/nodal/storage/**/*.java" /> <property name="build" value="build" /> <!-- property name="build.compiler" value="jikes"/ --> <!-- property name="build.compiler" value="gcj"/ --> <taskdef resource="checkstyletask.properties"/> <path id="project.compile.path"> <pathelement path="${classpath}"/> <pathelement path="../j-src/build/classes"/> <pathelement location="../j-src/lib/junit.jar"/> <pathelement location="../j-src/lib/jdbm.jar"/> <!-- pathelement location="../j-src/lib/jakarta-regexp-1.2.jar"/ --> <pathelement location="../j-src/lib/gnu-regexp-1.1.4.jar"/> <pathelement location="../j-src/lib/jdom.jar"/> <!-- pathelement location="../j-src/lib/log4j-1.2.8.jar"/ --> <!-- pathelement location="../j-src/lib/jaxp.jar"/ --> <pathelement location="../j-src/lib/xmlParserAPIs.jar"/> <pathelement location="../j-src/lib/xercesImpl.jar"/> <pathelement location="../j-src/lib/nekohtml.jar"/> <!-- pathelement location="../j-src/lib/patbinfree153.jar"/ --> </path> <path id="project.class.path"> <pathelement location="build/nodal.jar"/> <path refid="project.compile.path"/> </path> <path id="project.test.path"> <pathelement location="build/test.jar"/> <path refid="project.class.path"/> </path> <target name="prepare"> <!-- Create the time stamp --> <tstamp/> <!-- Create the build directory structure used by compile --> <mkdir dir="${build}/testclasses" /> </target> <target name="compile" depends="prepare"> <!-- Compute dependencies and remove out-of-date classes --> <depend srcdir="${src}" includes="${testincludes}" excludes="${testexcludes}" destdir="${build}/testclasses" classpathref="project.class.path" cache="${build}/depcache" closure="yes"/> <!-- Compile the java code from ${src} into ${build} --> <javac srcdir="${src}" includes="${testincludes}" excludes="${testexcludes}" destdir="${build}/testclasses" classpathref="project.class.path" debug="true" verbose="false"/> <!-- Put everything in ${build}/classes/test into the test.jar file --> <jar jarfile="${build}/test.jar" basedir="${build}/testclasses" /> </target> <target name="unit" depends="compile"> <java classname="test.Suite" classpathref="project.test.path" fork="yes" /> </target> <target name="clean"> <!-- Delete the ${build} and ${dist} directory trees --> <delete dir="${build}" /> </target> </project> |
From: Lee I. <le...@us...> - 2004-10-03 20:15:09
|
Update of /cvsroot/nodal/j-test/src/test/storage/http In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12471/src/test/storage/http Added Files: Suite.java TestHttpRepository.java Log Message: First commit separating j-test from j-src --- NEW FILE: Suite.java --- package test.storage.http; import junit.framework.Test; import junit.framework.TestSuite; /** JUnit TestSuite. * @testfamily JUnit * @testkind testsuite * @testsetup Default TestSuite * @testpackage test.storage*/ public class Suite extends TestSuite { public Suite(String name) { super (name); } public static Test suite() { TestSuite result = new TestSuite ("Test storage.http"); // Add calls to test cases here! result.addTestSuite(TestHttpRepository.class); return result; } public static void main(String[] args) { junit.textui.TestRunner.run (suite()); } } --- NEW FILE: TestHttpRepository.java --- /* * Distributed under the Apache Software License, Version 1.1 * (see below, or the file LICENSE for terms and conditions) * * Copyright (c) 2003 University of British Columbia. All rights reserved. * * Created on Nov 5, 2003 */ package test.storage.http; import org.nodal.Nodal; import org.nodal.Repository; import org.nodal.filesystem.Document; import org.nodal.model.Node; import org.nodal.model.NodeContent; import org.nodal.nav.Path.Failure; import junit.framework.TestCase; /** * * Created on Nov 5, 2003 * @author leei */ public class TestHttpRepository extends TestCase { /** * */ public TestHttpRepository(String name) { super(name); } protected void setUp() { } protected void tearDown() { } public void testW3C() { try { Repository r = Nodal.openRepository("http://w3c.org"); Document doc1 = r.document("/"); assertTrue (doc1 != null); Node doc1Root = doc1.root(); assertTrue (doc1Root != null); NodeContent content1 = doc1Root.content(); assertTrue (content1 != null); Document doc2 = r.document("Overview.html"); assertTrue (doc2 != null); Node doc2Root = doc2.root(); assertTrue (doc2Root != null); NodeContent content2 = doc2Root.content(); assertTrue (content2 != null); } catch (Failure e) { fail(); } } } |
From: Lee I. <le...@us...> - 2004-10-03 19:52:49
|
Update of /cvsroot/nodal/j-test/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12296/src Log Message: Directory /cvsroot/nodal/j-test/src added to the repository |
From: Lee I. <le...@us...> - 2004-10-03 19:50:23
|
Update of /cvsroot/nodal/j-test/src/test/storage/file In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12471/src/test/storage/file Added Files: Suite.java TestFileRepository.java Log Message: First commit separating j-test from j-src --- NEW FILE: Suite.java --- package test.storage.file; import junit.framework.Test; import junit.framework.TestSuite; /** JUnit TestSuite. * @testfamily JUnit * @testkind testsuite * @testsetup Default TestSuite * @testpackage test.storage*/ public class Suite extends TestSuite { public Suite(String name) { super (name); } public static Test suite() { TestSuite result = new TestSuite ("Test storage.file"); // Add calls to test cases here! result.addTestSuite(TestFileRepository.class); return result; } public static void main(String[] args) { junit.textui.TestRunner.run (suite()); } } --- NEW FILE: TestFileRepository.java --- /* * Created on Nov 26, 2003 * * To change the template for this generated file go to * Window>Preferences>Java>Code Generation>Code and Comments */ package test.storage.file; import java.io.IOException; import java.net.JarURLConnection; import java.net.URL; import java.util.Iterator; import org.nodal.Nodal; import org.nodal.Repository; import org.nodal.filesystem.Directory; import org.nodal.filesystem.Document; import org.nodal.filesystem.DocumentFormat; import org.nodal.model.Node; import org.nodal.model.NodeContent; import org.nodal.nav.Path; import org.nodal.nav.Paths; import org.nodal.nav.Path.Failure; import org.nodal.util.Name; import junit.framework.TestCase; /** * @author leei */ public class TestFileRepository extends TestCase { /** * */ public TestFileRepository(String name) { super(name); } protected void setUp() { } protected void tearDown() { } public void testFiles() { URL url = Nodal.class.getClassLoader().getResource("baseTypes.nls"); if (url.getProtocol().equals("jar")) { try { JarURLConnection conn = (JarURLConnection) url.openConnection(); URL jarFile = conn.getJarFileURL(); url = new URL(jarFile, "../extras/baseTypes.nls"); System.out.println("Load baseTypes from " + url); } catch (IOException e1) { fail(); } } String fname = url.toExternalForm(); try { Path path = Paths.parse(fname); Repository r = Nodal.openRepository(path); assertNotNull(r); Path rel = r.path().difference(path); System.out.println("Repo: " + r.path()); System.out.println("Rel : " + rel); Document doc = r.document(rel); assertNotNull(doc); DocumentFormat format = doc.format(); assertNotNull(format); System.out.println("baseTypes.nls: format = " + format); Node root = doc.root(); System.out.println("baseTypes.nls: root = " + root); assertNotNull(root); NodeContent content = root.content(); System.out.println("baseTypes.nls: content = " + content); assertNotNull(content); Directory dir = r.document(".").asDirectory(); System.out.println("/: dir = " + dir); assertNotNull(dir); Iterator e = dir.entries(); while (e.hasNext()) { Name nm = (Name) e.next(); Document d1 = dir.get(nm.string()); System.out.println("Document: "+d1); } } catch (Failure e) { fail(); } } } |
From: Lee I. <le...@us...> - 2004-10-03 19:45:55
|
Update of /cvsroot/nodal/j-test/src/test/org/nodal/nav In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12296/src/test/org/nodal/nav Log Message: Directory /cvsroot/nodal/j-test/src/test/org/nodal/nav added to the repository |
From: Lee I. <le...@us...> - 2004-10-03 19:44:17
|
Update of /cvsroot/nodal/j-test/src/test/org In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12471/src/test/org Added Files: org.dfPackage Log Message: First commit separating j-test from j-src --- NEW FILE: org.dfPackage --- package id1bkbwd16rpompd189ibnx; /** @version 2.0 @physicalPackage @__modelType diagram */ class diagram { /** @__ref <oiref:design#Class#id4ejbbd16rpompd189ibmn.diagram:oiref><oihard> @__modelType reference @__fqn <oiref:#Package#test.org.nodal:oiref> */ class reference { }}/** @__tags @shapeType ClassDiagram */ class __tags { }/** @__options */ class __options { }/** @__positions */ class __positions { } |
From: Lee I. <le...@us...> - 2004-10-03 19:44:09
|
Update of /cvsroot/nodal/j-test/src/test/org/nodal/nav In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12471/src/test/org/nodal/nav Added Files: TestPaths.java Suite.java TestPathDifference.java nav.dfPackage Log Message: First commit separating j-test from j-src --- NEW FILE: TestPaths.java --- /* * * Distributed under the Apache Software License, Version 1.1 * (see below, or the file LICENSE for terms and conditions) * * Copyright (c) 2002 University of British Columbia. All rights reserved. * */ package test.org.nodal.nav; import junit.framework.TestCase; import org.nodal.nav.Path; import org.nodal.nav.PathOperator; import org.nodal.nav.Paths; import org.nodal.nav.Path.Failure; /** JUnit TestCase. * @testfamily JUnit * @testkind testcase * @testsetup Default TestCase * @testedclass org.nodal.nav.Paths */ public class TestPaths extends TestCase { public TestPaths(String name) { super(name); } /** Sets up the fixture, for example, open a network connection. * This method is called before a test is executed. */ protected void setUp() { } public void testParentOp() { try { PathOperator op = Paths.createOp("parent"); // Any argument causes failure! assertTrue(Paths.createOp("parent", new String[] { null }) == null); // The parent op prints as .. assertTrue(op.toString().equals("..")); // Ensure that it's a proper PathOperator verifyPathOperator(op); } catch (Path.Failure f) { fail(); } } public void verifyPathOperator(PathOperator op) { } public void testPropertyOp() { try { PathOperator opInt1 = Paths.createOp("property", new String[] { "1" }); assertTrue(opInt1 != null); // No argument causes failure! assertTrue(Paths.createOp("property", new String[] { }) == null); // The parent op prints as .. assertTrue(opInt1.toString().equals("1")); // Ensure that it's a proper PathOperator verifyPathOperator(opInt1); PathOperator opInt2 = parseURL("#ndl(1)").operator(); assertTrue(opInt2 != null); assertTrue(opInt1.equals(opInt2)); } catch (Path.Failure e) { e.printStackTrace(); fail(); } } public void checkValidPath(String url, String canon) { try { parseURL(url); //assertTrue(canon.equals(p.toString())); } catch (Failure e) { System.err.println(url + ".vs." + canon); e.printStackTrace(); fail(); } } public void checkValidPath(String url) { checkValidPath (url, url); } private final Path parseURL(String s) throws Path.Failure { Path p = Paths.parse(s); // System.out.println( // "Parse \"" + s + "\" = " + p + " = <" + p.toURLString() + ">"); return p; } public void testParseOp() { checkValidPath("#ndl(.)"); checkValidPath("#ndl(..)"); checkValidPath("#ndl(/)"); checkValidPath("#ndl(15)"); checkValidPath("#ndl(15.)"); checkValidPath("#ndl(15.2)"); checkValidPath("#ndl(.152)"); //parseURL("#id+%40+123-test_"); //parseURL("#parent()"); //parseURL("#here()"); //parseURL("#property(1)"); //parseURL("#property(1.0)"); //parseURL("#property(true)"); //parseURL("#property(false)"); //parseURL("#property(p)"); try { parseURL("#ndl(.)"); parseURL("#ndl(..)"); parseURL("#ndl(/)"); parseURL("#ndl(15)"); parseURL("#ndl(15.)"); parseURL("#ndl(15.2)"); parseURL("#ndl(.152)"); parseURL("#ndl(.15.2)"); parseURL("#ndl(-10e-2)"); parseURL("#ndl(2002-12-13)"); parseURL("#ndl(id+%40+123-test_)"); parseURL("#ndl(parent())"); parseURL("#ndl(here())"); parseURL("#ndl(property(1))"); parseURL("#ndl(property(1.0))"); parseURL("#ndl(property(true))"); parseURL("#ndl(property(false))"); parseURL("#ndl(property(p))"); parseURL("#anchor1"); } catch (Path.Failure e) { e.printStackTrace(System.err); fail(); } } public void testParseFragments() { try { parseURL("#ndl(./.)"); parseURL("#ndl(/./.)"); parseURL("#ndl(//)"); parseURL("#ndl(//.)"); parseURL("#ndl(../..)"); parseURL("#ndl(15/..)"); parseURL("#ndl(15./.)"); parseURL("#ndl(15.2/../15.2)"); parseURL("#ndl(../.152)"); parseURL("#ndl(.15.2/.15.2)"); parseURL("#ndl(parent()/foo)"); parseURL("#ndl(here()/foo/bar/baz)"); parseURL("#ndl(/here()/foo/bar/baz)"); parseURL("#ndl(root()/here()/foo/bar/baz)"); parseURL("#ndl(property(1)/property(2))"); parseURL("#ndl(property(1)/property(2)/)"); } catch (Path.Failure e) { e.printStackTrace(System.err); fail(); } } public void testParsePaths() { try { parseURL("./."); parseURL("/./."); parseURL("../.."); parseURL("15/.."); parseURL("15./."); parseURL("15.2/../15.2"); parseURL("../.152"); parseURL(".15.2/.15.2"); parseURL("http://www.ece.ubc.ca/"); parseURL("mailto:le...@ec..."); parseURL("jar:file:/foo.jar!manifest/MANIFEST"); } catch (Path.Failure e) { e.printStackTrace(System.err); fail(); } } } --- NEW FILE: Suite.java --- package test.org.nodal.nav; import junit.framework.Test; import junit.framework.TestSuite; /** JUnit TestSuite. * @testfamily JUnit * @testkind testsuite * @testsetup Default TestSuite * @testpackage test.org.nodal.nav */ public class Suite extends TestSuite { public Suite() { addTest(suite()); } public static void main(String[] args) { junit.swingui.TestRunner.run(Suite.class); } public static Test suite() { TestSuite result = new TestSuite("Test org.nodal.nav"); // Add calls to test cases here! result.addTestSuite(TestPaths.class); result.addTestSuite(TestPathDifference.class); return result; } } --- NEW FILE: TestPathDifference.java --- /* * Distributed under the Apache Software License, Version 1.1 (see below, or the * file LICENSE for terms and conditions) * * Copyright (c) 2003 University of British Columbia. All rights reserved. * * Created on Dec 1, 2003 */ package test.org.nodal.nav; import org.nodal.nav.Path; import org.nodal.nav.Paths; import junit.framework.TestCase; /** * * Created on Dec 1, 2003 * * @author leei */ public class TestPathDifference extends TestCase { public TestPathDifference(String name) { super(name); } /** * Sets up the fixture, for example, open a network connection. This method is * called before a test is executed. */ protected void setUp() { } protected void tearDown() { } private Path checkDiff(Path p1, Path p2) throws Path.Failure { Path diff = p1.difference(p2); Path check = p1.apply(diff); //System.out.println(p2 + " - " + p1 + ":"); //System.out.println(" = " + diff); //System.out.println(" ? " + check); assertTrue(check == p2); return diff; } public void testAbsoluteDifferences() { try { Path base = Paths.parse("file:/foo/bar/baz"); checkDiff(base, Paths.parse("file:/foo/bar/baz")); checkDiff(base, Paths.parse("file:/foo/bar/baz/test.xml")); checkDiff(base, Paths.parse("file:/test.xml")); checkDiff(base, Paths.parse("http:/foo/bar/baz")); checkDiff(base, Paths.parse("file:/foo/baz/test.xml")); checkDiff(base, Paths.parse("file:/bar/baz/test.xml")); } catch (Path.Failure e) { e.printStackTrace(); fail(); } } public void testRelativeDifferences() { try { Path base = Paths.parse("foo/bar/baz"); checkDiff(base, Paths.parse("foo/bar/baz")); checkDiff(base, Paths.parse("foo/bar/baz/test.xml")); checkDiff(base, Paths.parse("test.xml")); checkDiff(base, Paths.parse("foo/baz/test.xml")); checkDiff(base, Paths.parse("bar/baz/test.xml")); } catch (Path.Failure e) { e.printStackTrace(); fail(); } } } --- NEW FILE: nav.dfPackage --- package id42hyxd9m0iqyjd9oq3zmg; /** @version 2.0 @physicalPackage @__modelType diagram */ class diagram { }/** @__tags @shapeType ClassDiagram */ class __tags { }/** @__options */ class __options { }/** @__positions */ class __positions { } |
From: Lee I. <le...@us...> - 2004-10-03 19:44:07
|
Update of /cvsroot/nodal/j-test/src/test/org/nodal/util In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12471/src/test/org/nodal/util Added Files: Suite.java TestGraphIterator.java Log Message: First commit separating j-test from j-src --- NEW FILE: Suite.java --- /* * Distributed under the Apache Software License, Version 1.1 * (see below, or the file LICENSE for terms and conditions) * * Copyright (c) 2004 University of British Columbia. All rights reserved. * * Created on Jul 16, 2004 by leei */ package test.org.nodal.util; import junit.framework.Test; import junit.framework.TestSuite; /** JUnit TestSuite. * @testfamily JUnit * @testkind testsuite * @testsetup Default TestSuite * @testpackage test.storage*/ public class Suite extends TestSuite { public Suite(String name) { super (name); } public static Test suite() { TestSuite result = new TestSuite ("Test storage.file"); // Add calls to test cases here! result.addTestSuite(TestGraphIterator.class); return result; } public static void main(String[] args) { junit.textui.TestRunner.run (suite()); } } --- NEW FILE: TestGraphIterator.java --- /* * Distributed under the Apache Software License, Version 1.1 * (see below, or the file LICENSE for terms and conditions) * * Copyright (c) 2004 University of British Columbia. All rights reserved. * * Created on Jul 16, 2004 by leei */ package test.org.nodal.util; import java.net.URL; import org.nodal.Nodal; import org.nodal.filesystem.Document; import org.nodal.model.Getter; import org.nodal.model.Node; import org.nodal.nav.Path; import org.nodal.nav.Paths; import org.nodal.util.GraphIterator; import junit.framework.TestCase; /** * @author leei */ public class TestGraphIterator extends TestCase { /* * @see TestCase#setUp() */ protected void setUp() throws Exception { super.setUp(); } /* * @see TestCase#tearDown() */ protected void tearDown() throws Exception { super.tearDown(); } private void checkResource (String rname) throws Path.Failure { URL url = Nodal.class.getClassLoader().getResource(rname); Document doc = Nodal.openDocument(url.toExternalForm()); checkDocument (doc); } private void checkDocument (Document doc) throws Path.Failure { Node root = doc.root(); Path rootPath = doc.path().apply(Paths.createOp("root")); checkIterator (root, rootPath); } private void checkIterator (Node node, Path path) throws Path.Failure { GraphIterator i = new GraphIterator (node); //System.err.println ("BFS { "+path); while (i.hasNext()) { Path relPath = i.nextPath(); Path absPath = path.apply(relPath); Node rel = i.nextNode (); //System.err.println (" + "+relPath+" => "+rel); Getter binding = absPath.bind(); Node bound = binding.getNode(); assertTrue (bound.bareNode() == rel.bareNode()); } //System.err.println("} BFS"); } public void testIterator () { try { checkResource ("baseTypes.nls"); checkResource ("xml.nls"); } catch (Path.Failure e) { e.printStackTrace(); fail (); } } } |
From: Lee I. <le...@us...> - 2004-10-03 19:44:03
|
Update of /cvsroot/nodal/j-test/src/test/org/nodal/schemata/text/xml In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12296/src/test/org/nodal/schemata/text/xml Log Message: Directory /cvsroot/nodal/j-test/src/test/org/nodal/schemata/text/xml added to the repository |
From: Lee I. <le...@us...> - 2004-10-03 19:44:03
|
Update of /cvsroot/nodal/j-test/src/test/org/nodal/schemata/text/plain In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12471/src/test/org/nodal/schemata/text/plain Added Files: TestDecTextPlain.java TestEncTextPlain.java Log Message: First commit separating j-test from j-src --- NEW FILE: TestDecTextPlain.java --- /* * TestEncTextPlain.java * JUnit based test * * Nelson Siu * Created on June 2, 2003, 9:34 AM */ package test.org.nodal.schemata.text.plain; import java.io.FileInputStream; import java.io.IOException; import java.io.InputStream; import junit.framework.TestCase; import org.nodal.format.text.plain.Format; import org.nodal.Nodal; import org.nodal.Types; import org.nodal.filesystem.DocumentFormat; import org.nodal.model.Node; import org.nodal.model.SequenceNode; import org.nodal.nav.Path.Failure; import org.nodal.type.SequenceType; import org.nodal.type.Schema; import org.nodal.util.IndexBoundsException; import org.nodal.util.PropertyConstraintFailure; import storage.trans.TransientRepository; /** * * @author Nelson Siu */ public class TestDecTextPlain extends TestCase { protected Schema.Editor typeDoc; protected SequenceType sSeqType; protected TransientRepository repo; protected SequenceNode sSeq; protected DocumentFormat testTextSchema; protected Format.Decoder testDecoder; protected Node n; public TestDecTextPlain(String name) { super(name); } /** Sets up the repository and context node *This method is called before a test is executed. */ protected void setUp() { //Create a new repository try { repo = (TransientRepository) Nodal.openRepository("memory://audited"); } catch (Failure e) { fail(); } typeDoc = Types.createSchema("memory://audited/testme.nls"); sSeqType = typeDoc.createSequenceType(Types.STRING); //Special mode created by Lee to allow for node creation straight from the repo // o This node is used to create the factory for the decoder in the test n = repo.createNode(sSeqType); //Create a new decoder testTextSchema = Format.documentFormat(); testDecoder = testTextSchema.decoder(); } protected void tearDown() { repo.close(); } //========================================================================== /**Test Decoder open text file and encode into a sequence of nodes*/ public void testDecode() { //Open a stream from text file try { //Create a new file stream for the decoder InputStream in = new FileInputStream("decText.txt"); //Pass file stream and context node (as a NodeFactory) to the decoder Node returnedNode = testDecoder.decode(in, n.content().edit()); //Get sequence from the decoded return Node sSeq = returnedNode.content().asSequenceNode(); //Get all lines start to finish SequenceNode line0 = sSeq.item(0).getNode().asSequenceNode(); //We use valueEquals because it tests without copying contents assertTrue(line0.range(0, -1).valueEquals("Line 1")); SequenceNode line1 = sSeq.item(1).getNode().asSequenceNode(); assertTrue(line1.range(0, -1).valueEquals("Line 2")); SequenceNode line2 = sSeq.item(2).getNode().asSequenceNode(); assertTrue(line2.range(0, -1).valueEquals("Line 3")); } catch (IOException e) { System.err.println(e); fail("Test file not found"); System.exit(1); } catch (IndexBoundsException e) { System.err.println(e); System.exit(1); } catch (PropertyConstraintFailure e) { System.err.println(e); System.exit(1); } } } --- NEW FILE: TestEncTextPlain.java --- /* * TestEncTextPlain.java * JUnit based test * * Created on June 2, 2003, 9:34 AM */ package test.org.nodal.schemata.text.plain; import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.OutputStream; import junit.framework.TestCase; import org.nodal.Nodal; import org.nodal.Types; import org.nodal.filesystem.DocumentFormat; import org.nodal.model.Node; import org.nodal.model.SequenceNode; import org.nodal.model.Setter; import org.nodal.nav.Path.Failure; import org.nodal.format.text.plain.Format; import org.nodal.type.SequenceType; import org.nodal.type.Schema; import org.nodal.util.ConstraintFailure; import storage.trans.TransientRepository; /** * * @author Maryam */ public class TestEncTextPlain extends TestCase { protected Schema.Editor typeDoc; protected SequenceType sSeqType; protected TransientRepository repo; protected SequenceNode sSeq; protected SequenceNode.Editor sSeqEd; protected Setter sSeqSetter; protected DocumentFormat testTextSchema; protected Format.Encoder testEncoder; protected Node myTestNode; public TestEncTextPlain(String name) { super(name); } /** Sets up the repository and the test node tree *This method is called before a test is executed. */ protected void setUp() { //Create a new repository try { repo = (TransientRepository) Nodal.openRepository("memory://transient"); } catch (Failure e) { fail(); } //Create a new encoder testTextSchema = Format.documentFormat(); testEncoder = testTextSchema.encoder(); typeDoc = Types.createSchema("testme.nls"); sSeqType = typeDoc.createSequenceType(Types.STRING); //Special mode created by Lee to allow for node creation straight from the repo myTestNode = repo.createNode(sSeqType); sSeq = myTestNode.content().asSequenceNode(); sSeqEd = sSeq.editSequence(); try { // Create a node tree with 2 nodes sSeqSetter = sSeqEd.insertAfter(-1); SequenceNode.Editor newNode1 = sSeqEd.createNode(Types.STRING).editSequence(); newNode1.insertAfter(-1).set("line 1"); sSeqSetter.set(newNode1.bareNode()); SequenceNode.Editor newNode2 = sSeqEd.createNode(Types.STRING).editSequence(); newNode2.insertAfter(-1).set("line 2"); sSeqSetter.set(newNode2.bareNode()); /* System.err.println ("Get [-2] = "+sSeqEd.item(-2).get()); System.err.println ("Get [-1] = "+sSeqEd.item(-1).get()); System.err.println ("Get [ 0] = "+sSeqEd.item(0).get()); System.err.println ("Get [ 1] = "+sSeqEd.item(1).get()); */ } catch (ConstraintFailure f) { System.out.println("Constraint Failure in TestEncTextPlain"); System.exit(1); } } protected void tearDown() { repo.close(); } public void testEncode() { OutputStream out = new ByteArrayOutputStream(); try { out = testEncoder.encode(out, myTestNode); } catch (IOException e) { fail(); } //Examine that the nodes were indeed encoded into the output stream String lineEnd = System.getProperty("line.separator"); assertTrue(out.toString().equals("line 1" + lineEnd + "line 2" + lineEnd)); } } |
From: Lee I. <le...@us...> - 2004-10-03 19:44:02
|
Update of /cvsroot/nodal/j-test/src/test/storage/http In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12296/src/test/storage/http Log Message: Directory /cvsroot/nodal/j-test/src/test/storage/http added to the repository |
From: Lee I. <le...@us...> - 2004-10-03 19:44:02
|
Update of /cvsroot/nodal/j-test/src/test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12296/src/test Log Message: Directory /cvsroot/nodal/j-test/src/test added to the repository |
From: Lee I. <le...@us...> - 2004-10-03 19:43:49
|
Update of /cvsroot/nodal/j-test/src/test/org/nodal/schemata/text/xml In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12471/src/test/org/nodal/schemata/text/xml Added Files: TestXML.java Log Message: First commit separating j-test from j-src --- NEW FILE: TestXML.java --- /* * Distributed under the Apache Software License, Version 1.1 * (see below, or the file LICENSE for terms and conditions) * * Copyright (c) 2003 University of British Columbia. All rights reserved. * * Created on Feb 20, 2004 */ package test.org.nodal.schemata.text.xml; import java.net.MalformedURLException; import java.net.URL; import org.nodal.Nodal; import org.nodal.Types; import org.nodal.filesystem.DocumentFormat; import org.nodal.model.NodeFactory; import storage.trans.TransientRepository; import test.org.nodal.schemata.SchemataTestCase; /** * * Created on Feb 20, 2004 * * @author leei */ public class TestXML extends SchemataTestCase { private TransientRepository repo; /** * Constructor for TestXML. * * @param arg0 */ public TestXML(String arg0) { super(arg0); } /* * @see TestCase#setUp() */ protected void setUp() throws Exception { repo = (TransientRepository) Nodal.openRepository("memory://transient"); NodeFactory factory = repo.createNode(Types.DOCTYPE); DocumentFormat format = DocumentFormat.Registry.get("text/xml"); super.setUp(format, factory); } /* * @see TestCase#tearDown() */ protected void tearDown() throws Exception { super.tearDown(); } public void testParser() { try { URL baseTypes = new URL(Types.BASEURI); tryParser (baseTypes); tryParser (new URL (baseTypes, "xml.nls")); tryParser (new URL (baseTypes, "text.nls")); tryParser (new URL (baseTypes, "octet.nls")); //tryParser (new URL (baseTypes, "types.dtd"), xmlFormat); } catch (MalformedURLException e) { e.printStackTrace(System.err); fail(); } } } |