xmlgen
xmlgen copied to clipboard
test suite & benchmark failures
I think we forgot to re-enable the test suite for stackage, but now there are new failures:
> /tmp/stackage-build8/xmlgen-0.6.2.1$ runghc -clear-package-db -global-package-db -package-db=/var/stackage/work/builds/nightly/pkgdb Setup configure --enable-tests --package-db=clear --package-db=global --package-db=/var/stackage/work/builds/nightly/pkgdb --libdir=/var/stackage/work/builds/nightly/lib --bindir=/var/stackage/work/builds/nightly/bin --datadir=/var/stackage/work/builds/nightly/share --libexecdir=/var/stackage/work/builds/nightly/libexec --sysconfdir=/var/stackage/work/builds/nightly/etc --docdir=/var/stackage/work/builds/nightly/doc/xmlgen-0.6.2.1 --htmldir=/var/stackage/work/builds/nightly/doc/xmlgen-0.6.2.1 --haddockdir=/var/stackage/work/builds/nightly/doc/xmlgen-0.6.2.1 --flags=
Configuring xmlgen-0.6.2.1...
> /tmp/stackage-build8/xmlgen-0.6.2.1$ runghc -clear-package-db -global-package-db -package-db=/var/stackage/work/builds/nightly/pkgdb Setup build
Building xmlgen-0.6.2.1...
Preprocessing library xmlgen-0.6.2.1...
[1 of 1] Compiling Text.XML.Generator ( src/Text/XML/Generator.hs, dist/build/Text/XML/Generator.o )
Preprocessing test suite 'xmlgen-tests' for xmlgen-0.6.2.1...
[1 of 1] Compiling Main ( test/GeneratorTest.hs, dist/build/xmlgen-tests/xmlgen-tests-tmp/Main.o )
Linking dist/build/xmlgen-tests/xmlgen-tests ...
> /tmp/stackage-build8/xmlgen-0.6.2.1$ dist/build/xmlgen-tests/xmlgen-tests
Cases: 8 Tried: 0 Errors: 0 Failures: 0test/1.xml: openFile: does not exist (No such file or directory)
### Failure in: 0:test_1
test/GeneratorTest.hs:39
test/GeneratorTest.hs:68: Expected "", given: "<?xml version=\"1.0\"?>\n<__foo:foo xmlns:__foo=\"urn:__foo\" xmlns:_foo=\"urn:_foo\" _foo:key=\"value\" _foo:key2=\"value\">\n <foo:bar xmlns:foo=\"urn:foo\" _foo:key=\"value\">BAR</foo:bar>\n <foo:bar xmlns:foo=\"urn:foo\">\n <___foo:spam xmlns:___foo=\"urn:bar\"><egg/>this is spam!</___foo:spam>\n </foo:bar>\n</__foo:foo>\n"
expected: ""
but got: "<?xml version=\"1.0\"?>\n<__foo:foo xmlns:__foo=\"urn:__foo\" xmlns:_foo=\"urn:_foo\" _foo:key=\"value\" _foo:key2=\"value\">\n <foo:bar xmlns:foo=\"urn:foo\" _foo:key=\"value\">BAR</foo:bar>\n <foo:bar xmlns:foo=\"urn:foo\">\n <___foo:spam xmlns:___foo=\"urn:bar\"><egg/>this is spam!</___foo:spam>\n </foo:bar>\n</__foo:foo>\n"
Cases: 8 Tried: 1 Errors: 0 Failures: 1test/2.xml: openFile: does not exist (No such file or directory)
### Failure in: 1:test_2
test/GeneratorTest.hs:39
test/GeneratorTest.hs:84: Expected "", given: "<?xml version=\"1.0\"?>\n<foo key=\"value\" key2=\"value2\">\n <bar/>\n <spam key=\"value\"/>\n <egg>ham</egg>\n <foo:bar xmlns:foo=\"http://www.example.com\"/>\n <foo:spam xmlns:foo=\"http://www.example.com\" foo:key=\"value\"/>\n <foo:egg xmlns:foo=\"http://www.example.com\">\n <ham/>\n </foo:egg>\n</foo>\n"
expected: ""
but got: "<?xml version=\"1.0\"?>\n<foo key=\"value\" key2=\"value2\">\n <bar/>\n <spam key=\"value\"/>\n <egg>ham</egg>\n <foo:bar xmlns:foo=\"http://www.example.com\"/>\n <foo:spam xmlns:foo=\"http://www.example.com\" foo:key=\"value\"/>\n <foo:egg xmlns:foo=\"http://www.example.com\">\n <ham/>\n </foo:egg>\n</foo>\n"
Cases: 8 Tried: 2 Errors: 0 Failures: 2test/3.xml: openFile: does not exist (No such file or directory)
### Failure in: 2:test_3
test/GeneratorTest.hs:39
test/GeneratorTest.hs:93: Expected "", given: "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n<foo key=\"val"'&<>ue\"><&;'</foo>\n"
expected: ""
but got: "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n<foo key=\"val"'&<>ue\"><&;'</foo>\n"
Cases: 8 Tried: 3 Errors: 0 Failures: 3test/4.xml: openFile: does not exist (No such file or directory)
### Failure in: 3:test_4
test/GeneratorTest.hs:39
test/GeneratorTest.hs:108: Expected "", given: "<?xml version=\"1.0\"?>\n<x xmlns=\"http://URI\" xmlns:_=\"http://URI\" _:a=\"in URI\" b=\"in no ns\" c=\"in default ns\">\n <y xmlns=\"\" _:a=\"in URI\" b=\"in no ns\" c=\"in default ns\">\n <_:z _:a=\"in URI\" b=\"in no ns\" c=\"in default ns\"/>\n </y>\n</x>\n"
expected: ""
but got: "<?xml version=\"1.0\"?>\n<x xmlns=\"http://URI\" xmlns:_=\"http://URI\" _:a=\"in URI\" b=\"in no ns\" c=\"in default ns\">\n <y xmlns=\"\" _:a=\"in URI\" b=\"in no ns\" c=\"in default ns\">\n <_:z _:a=\"in URI\" b=\"in no ns\" c=\"in default ns\"/>\n </y>\n</x>\n"
Cases: 8 Tried: 4 Errors: 0 Failures: 4test/5.xml: openFile: does not exist (No such file or directory)
### Failure in: 4:test_5
test/GeneratorTest.hs:39
test/GeneratorTest.hs:121: Expected "", given: "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n<people>\n <person age=\"32\">Stefan</person>\n <person age=\"4\">Judith</person>\n</people>\n"
expected: ""
but got: "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n<people>\n <person age=\"32\">Stefan</person>\n <person age=\"4\">Judith</person>\n</people>\n"
Cases: 8 Tried: 5 Errors: 0 Failures: 5test/xhtml.xml: openFile: does not exist (No such file or directory)
### Failure in: 5:test_xhtml
test/GeneratorTest.hs:39
test/GeneratorTest.hs:130: Expected "", given: "<?xml version=\"1.0\"?>\n<html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"de\" lang=\"de\">\n <head>\n <title>Test</title>\n </head>\n <body foo=\"1\"/>\n</html>\n"
expected: ""
but got: "<?xml version=\"1.0\"?>\n<html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"de\" lang=\"de\">\n <head>\n <title>Test</title>\n </head>\n <body foo=\"1\"/>\n</html>\n"
Cases: 8 Tried: 6 Errors: 0 Failures: 6+++ OK, passed 100 tests.
Cases: 8 Tried: 7 Errors: 0 Failures: 6+++ OK, passed 100 tests.
Cases: 8 Tried: 8 Errors: 0 Failures: 6
There are also benchmark compilation errors
> /tmp/stackage-build8/xmlgen-0.6.2.1$ runghc -clear-package-db -global-package-db -package-db=/var/stackage/work/builds/nightly/pkgdb Setup configure --enable-benchmarks --package-db=clear --package-db=global --package-db=/var/stackage/work/builds/nightly/pkgdb --libdir=/var/stackage/work/builds/nightly/lib --bindir=/var/stackage/work/builds/nightly/bin --datadir=/var/stackage/work/builds/nightly/share --libexecdir=/var/stackage/work/builds/nightly/libexec --sysconfdir=/var/stackage/work/builds/nightly/etc --docdir=/var/stackage/work/builds/nightly/doc/xmlgen-0.6.2.1 --htmldir=/var/stackage/work/builds/nightly/doc/xmlgen-0.6.2.1 --haddockdir=/var/stackage/work/builds/nightly/doc/xmlgen-0.6.2.1 --flags=
Configuring xmlgen-0.6.2.1...
> /tmp/stackage-build8/xmlgen-0.6.2.1$ runghc -clear-package-db -global-package-db -package-db=/var/stackage/work/builds/nightly/pkgdb Setup build
Building xmlgen-0.6.2.1...
Preprocessing library xmlgen-0.6.2.1...
[1 of 1] Compiling Text.XML.Generator ( src/Text/XML/Generator.hs, dist/build/Text/XML/Generator.o )
Preprocessing benchmark 'xmlgen-bench' for xmlgen-0.6.2.1...
[1 of 1] Compiling Main ( test/GeneratorBenchmarks.hs, dist/build/xmlgen-bench/xmlgen-bench-tmp/Main.o )
test/GeneratorBenchmarks.hs:10:25: error:
• Couldn't match type ‘[Char]’ with ‘T.Text’
Expected type: Name
Actual type: [Char]
• In the first argument of ‘xelem’, namely ‘"root"’
In the expression: xelem "root"
In the expression:
xelem "root"
$ xelems
$ map
(\ s -> xelem "foo" (xattr "key" s, xtext s))
(map (\ i -> T.pack (show i)) [1 .. numberOfElems])
test/GeneratorBenchmarks.hs:10:60: error:
• Couldn't match type ‘[Char]’ with ‘T.Text’
Expected type: Name
Actual type: [Char]
• In the first argument of ‘xelem’, namely ‘"foo"’
In the expression: xelem "foo" (xattr "key" s, xtext s)
In the first argument of ‘map’, namely
‘(\ s -> xelem "foo" (xattr "key" s, xtext s))’
test/GeneratorBenchmarks.hs:10:73: error:
• Couldn't match type ‘[Char]’ with ‘T.Text’
Expected type: Name
Actual type: [Char]
• In the first argument of ‘xattr’, namely ‘"key"’
In the expression: xattr "key" s
In the second argument of ‘xelem’, namely
‘(xattr "key" s, xtext s)’
test/GeneratorBenchmarks.hs:14:25: error:
• Couldn't match type ‘[Char]’ with ‘T.Text’
Expected type: Name
Actual type: [Char]
• In the first argument of ‘xelem’, namely ‘"root"’
In the expression: xelem "root"
In the expression:
xelem "root"
$ xattrs
$ map
(\ s -> xattr ("key-" ++ s) (T.pack s))
(map (\ i -> show i) [1 .. numberOfElems])
test/GeneratorBenchmarks.hs:14:61: error:
• Couldn't match type ‘[Char]’ with ‘T.Text’
Expected type: Name
Actual type: [Char]
• In the first argument of ‘xattr’, namely ‘("key-" ++ s)’
In the expression: xattr ("key-" ++ s) (T.pack s)
In the first argument of ‘map’, namely
‘(\ s -> xattr ("key-" ++ s) (T.pack s))’
test/GeneratorBenchmarks.hs:21:74: error:
• Couldn't match expected type ‘Benchmarkable’
with actual type ‘IO ()’
• In the second argument of ‘bench’, namely ‘(benchElems i)’
In the expression: bench (show i ++ " elems") (benchElems i)
In the expression:
[bench (show i ++ " elems") (benchElems i),
bench (show i ++ " attrs") (benchAttrs i)]
test/GeneratorBenchmarks.hs:22:74: error:
• Couldn't match expected type ‘Benchmarkable’
with actual type ‘IO ()’
• In the second argument of ‘bench’, namely ‘(benchAttrs i)’
In the expression: bench (show i ++ " attrs") (benchAttrs i)
In the expression:
[bench (show i ++ " elems") (benchElems i),
bench (show i ++ " attrs") (benchAttrs i)]
The test data is missing from the .cabal file.