Michael, I think you pushed your configure.mk file again. I had to modify it to get the build to work. Is there any other reason why this would happen? It said it failed to merge and my copy was named with an orig extension. Best regards from Ohio, Vic -----Original Message----- From: liblouis-liblouisxml-bounce@xxxxxxxxxxxxx [mailto:liblouis-liblouisxml-bounce@xxxxxxxxxxxxx] On Behalf Of liblouisutdml@xxxxxxxxxxxxxx Sent: Tuesday, August 12, 2014 11:04 AM To: liblouis-liblouisxml@xxxxxxxxxxxxx Subject: [liblouis-liblouisxml] [liblouisutdml] push by mwhapples - Modification of test element names and documentation. on 2014-08-12 15:03 GMT Revision: 83beeec17ccb Branch: default Author: Michael Whapples Date: Tue Aug 12 15:03:34 2014 UTC Log: Modification of test element names and documentation. http://code.google.com/p/liblouisutdml/source/detail?r=83beeec17ccb Added: /java/tests.readme Modified: /java/testdata/tests.xml /java/tests/org/liblouis/SimpleTest.java /windows/configure.mk ======================================= --- /dev/null +++ /java/tests.readme Tue Aug 12 15:03:34 2014 UTC @@ -0,0 +1,29 @@ +================================= +LibLouisUTDML Java test Framework +================================= + +The test framework for the LibLouisUTDML Java bindings is designed as a simple way to provide the data for testing LibLouisUTDML functions. Currently it supports testing the translateString and translateFile methods of LibLouisUTDML, for other methods and more complicated tests of the API (eg. tests involving multiple function calls) you will need to write your own tests using a more general Java test framework such as TestNG. + +test.xml +======== + +The main file you will need to interact with when writing tests is the tests.xml file which can be found in the testdata directory. In test.xml you define the data which will be used for the function calls. + +The root node of the tests.xml file is <tests>. The <tests> node can contain either a <translateFileTest> and/or <translateStringTest> nodes depending upon which function is to be tested. + +The <translateFileTest> node +============================ + +Use the <translateFileTest> node for a test using the translateFile function in the LibLouisUTDML API. This node can contain the following child nodes for the test data. + +* <configList>: The content of this node is the text to be placed in the configList parameter of the function call. This node is required. +* <inFile>: The file to be used as input. If using a relative file path, then this is done with the liblouisutdml/java directory as the current directory. This node is required. +* <expectedOutFile>: This is the file which the output should be compared against to determine if the test has passed. This is a relative path with the current directory set to the liblouisutdml/java directory. This node is required. +* <settings>: This is the value of the settings string parameter to the function call. This node is optional, if it is not given then settings string parameter will be set to null. +* <logFileName>: The log file LibLouisUTDML should use. This is optional, if not given is set to null. This node ideally should not be given now as the logFile parameter is becoming defunct in LibLouisUTDML with the logging callback system. +* <mode>: This is the mode parameter. At the moment you need to set this to the integer value, you cannot use the enum values from LibLouisUTDML. This node is optional and if not given is set to 0. + +The <translateStringTest> node +============================== + +This node works in a similar way to the translateFileTest node except it reads the input and output files into Java strings and uses these when calling the translateString function. In all other respects this node is treated in the same manner. ======================================= --- /java/testdata/tests.xml Mon Jul 28 13:14:02 2014 UTC +++ /java/testdata/tests.xml Tue Aug 12 15:03:34 2014 UTC @@ -8,7 +8,7 @@ </translateFileTest> <translateStringTest> <configList>nimas.cfg</configList> - <inbuf>testdata/list-test.xml</inbuf> - <outbuf>testdata/output.utd</outbuf> + <inFile>testdata/list-test.xml</inFile> + <expectedOutFile>testdata/output.utd</expectedOutFile> </translateStringTest> </tests> ======================================= --- /java/tests/org/liblouis/SimpleTest.java Mon Jul 28 13:14:02 2014 UTC +++ /java/tests/org/liblouis/SimpleTest.java Tue Aug 12 15:03:34 2014 UTC @@ -168,8 +168,8 @@ XPath xpath = factory.newXPath(); XPathExpression testsExpr = xpath.compile("/tests/translateStringTest"); XPathExpression configListExpr = xpath.compile("configList/text()"); - XPathExpression inbufExpr = xpath.compile("inbuf/text()"); - XPathExpression outbufExpr = xpath.compile("outbuf/text()"); + XPathExpression inbufExpr = xpath.compile("inFile/text()"); + XPathExpression outbufExpr = xpath.compile("expectedOutFile/text()"); XPathExpression logFileNameExpr = xpath.compile("logFileName/text()"); XPathExpression settingsExpr = xpath.compile("settings/text()"); XPathExpression modeExpr = xpath.compile("mode/text()"); ======================================= --- /windows/configure.mk Mon Apr 21 11:49:46 2014 UTC +++ /windows/configure.mk Tue Aug 12 15:03:34 2014 UTC @@ -2,7 +2,7 @@ # The values given here should be treated as examp.les. # They apply only to the development machine. -LIBLOUIS_PATH = c:\liblouis -JAVA_HEADERS_PATH = "c:\Program Files\Java\jdk1.6.0_23\include" -LIBXML2_PATH = c:\libxml2-2.7.2 +LIBLOUIS_PATH = d:\aph\liblouis-repo\liblouis +JAVA_HEADERS_PATH = "c:\Program Files\Java\jdk1.8.0_05\include" +LIBXML2_PATH = d:\aph\liblouis-repo\libxml2-2.7.2 For a description of the software, to download it and links to project pages go to http://www.abilitiessoft.com For a description of the software, to download it and links to project pages go to http://www.abilitiessoft.com