-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Test and documentation for numeral-conversion.xsl
changes to numeral-conversion.xsl: - comments for readability/future documentation - line 21 formatting for readability new test, numeral-conversion.xspec
- Loading branch information
1 parent
24a9e91
commit 531d4e1
Showing
2 changed files
with
65 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<x:description xmlns:x="http://www.jenitennison.com/xslt/xspec" stylesheet="../../main/resources/xml/xslt/numeral-conversion.xsl" xmlns:pf="http://www.daisy.org/ns/pipeline/functions" xmlns:f="http://www.daisy.org/ns/pipeline/internal-functions" xmlns:xs="http://www.w3.org/2001/XMLSchema"> | ||
|
||
<x:scenario label="testing pf:numeric-is-roman with valid roman numerals"> | ||
<x:call function="pf:numeric-is-roman"> | ||
<x:param name="roman" select="'MMDCLXXVIII'" as="xs:string"/> | ||
</x:call> | ||
<x:expect label="result should be true" select="true()"/> | ||
</x:scenario> | ||
|
||
<x:scenario label="testing pf:numeric-is-roman with invalid roman numerals"> | ||
<x:call function="pf:numeric-is-roman"> | ||
<x:param name="roman" select="'MMDCuLXXVIII'" as="xs:string"/> | ||
</x:call> | ||
<x:expect label="result should be false" select="false()"/> | ||
</x:scenario> | ||
|
||
<x:scenario label="testing pf:numeric-roman-to-decimal with valid roman numerals"> | ||
<x:call function="pf:numeric-roman-to-decimal"> | ||
<x:param name="roman" select="'MMDCLXXVIII'" as="xs:string"/> | ||
</x:call> | ||
<x:expect label="result should be 2678" select="2678"/> | ||
</x:scenario> | ||
|
||
<!-- PENDING - IN PROGRESS, WAITING ON TODO --> | ||
<x:scenario label="testing pf:numeric-roman-to-decimal with invalid roman numerals" pending="true"> | ||
<x:call function="pf:numeric-roman-to-decimal"> | ||
<x:param name="roman" select="'MMDCuLXXVIII'"/> | ||
</x:call> | ||
<x:expect label="should result in error" select=""/> | ||
</x:scenario> | ||
|
||
<x:scenario label="testing pf:numeric-decimal-to-roman with valid decimal"> | ||
<x:call function="pf:numeric-decimal-to-roman"> | ||
<x:param name="roman" select="2678" as="xs:integer"/> | ||
</x:call> | ||
<x:expect label="result should be MMDCLXXVIII" select="'MMDCLXXVIII'"/> | ||
</x:scenario> | ||
|
||
<!-- PENDING - IN PROGRESS, WAITING ON TODO --> | ||
<x:scenario label="testing pf:numeric-decimal-to-roman with non-positive decimal" pending="true"> | ||
<x:call function="pf:numeric-roman-to-decimal"> | ||
<x:param name="roman" select="2678" as="xs:integer"/> | ||
</x:call> | ||
<x:expect label="should result in error" select=""/> | ||
</x:scenario> | ||
|
||
<!-- PENDING - IN PROGRESS --> | ||
<x:scenario label="testing of pf:numeric-alpha-to-decimal" pending="true"> | ||
<x:call function="pf:numeric-alpha-to-decimal"> | ||
<x:param name="alpha" select="'¥Î'" as="xs:string"/> | ||
</x:call> | ||
<x:expect label="result should be 165206" select="165206"/> | ||
</x:scenario> | ||
</x:description> |