lib: migrate nitunits to annotations
authorAlexandre Terrasa <alexandre@moz-code.org>
Tue, 6 Jun 2017 05:19:51 +0000 (01:19 -0400)
committerAlexandre Terrasa <alexandre@moz-code.org>
Wed, 6 Sep 2017 22:58:06 +0000 (18:58 -0400)
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>

12 files changed:
lib/bitmap/test_bitmap.nit
lib/core/text/test_abstract_text.nit
lib/github/test_github_curl.nit
lib/gmp/test_native_gmp.nit
lib/markdown/test_markdown.nit
lib/markdown/test_wikilinks.nit
lib/sax/helpers/test_attributes_impl.nit
lib/sax/helpers/test_namespace_support.nit
lib/saxophonit/test_saxophonit.nit
lib/saxophonit/test_testing.nit
lib/saxophonit/testing.nit
lib/template/test_macro.nit

index 4475689..2f76da6 100644 (file)
 #
 #
 # A module for testing the classes in the bitmap module
-module test_bitmap is test_suite
+module test_bitmap is test
 
 import bitmap
-import test_suite
 
 class TestBitmap
-       super TestSuite
+       test
 
-       fun test_grayscale do
+       fun test_grayscale is test do
                var bitmap = new Bitmap.with_size(400, 300)
                for y in [0..300] do
                        for x in [0..200] do bitmap.set_pixel(x, y, 0x0077AAAA)
index af7dc00..ec9bda6 100644 (file)
@@ -8,21 +8,20 @@
 # You  are  allowed  to  redistribute it and sell it, alone or is a part of
 # another product.
 
-module test_abstract_text is test_suite
+module test_abstract_text is test
 
-import test_suite
 import text
 intrude import ropes
 
 class TestText
-       super TestSuite
+       test
 
        private var factories: Collection[TextFactory] = [
                new ConcatFactory,
                new FlatBufferFactory
        : TextFactory]
 
-       fun test_escape_to_c do
+       fun test_escape_to_c is test do
                for f in factories do
                        assert f.create("abAB12<>&").escape_to_c       == "abAB12<>&"
                        assert f.create("\n\"'\\").escape_to_c         == "\\n\\\"\\'\\\\"
index e0369ed..25ce970 100644 (file)
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-module test_github_curl is test_suite
+module test_github_curl is test
 
 import github::github_curl
-import test_suite
 
 class TestGithubCurl
-       super TestSuite
+       test
 
        var auth: String = get_github_oauth
        var user_agent: String = "nit"
        var testee: GithubCurl is noinit
 
-       redef fun before_test do
+       fun before_test is before do
                testee = new GithubCurl(auth, user_agent)
        end
 
-       fun test_get_repo do
+       fun test_get_repo is test do
                var uri = "https://api.github.com/repos/nitlang/nit"
                var res = testee.get_and_check(uri)
 
@@ -37,7 +36,7 @@ class TestGithubCurl
                assert res["owner"] isa JsonObject
        end
 
-       fun test_get_user do
+       fun test_get_user is test do
                var uri = "https://api.github.com/users/Morriar"
                var res = testee.get_and_check(uri)
 
index b27a3c0..fc00782 100644 (file)
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-module test_native_gmp is test_suite
+module test_native_gmp is test
 
-import test_suite
 import native_gmp
 
 class TestNativeMPZ
-    super TestSuite
+       test
 
     var op1: NativeMPZ
     var op2: NativeMPZ
@@ -26,9 +25,7 @@ class TestNativeMPZ
     var r: NativeMPQ
     var res: NativeMPZ
 
-    init do end
-
-    redef fun before_test do
+    fun before_test is before do
         op1 = new NativeMPZ
         op2 = new NativeMPZ
         ui = new UInt64
@@ -36,7 +33,7 @@ class TestNativeMPZ
         res = new NativeMPZ
     end
 
-    redef fun after_test do
+    fun after_test is after do
         op1.finalize
         op2.finalize
         ui.free
@@ -212,23 +209,21 @@ class TestNativeMPZ
 end
 
 class TestNativeMPQ
-    super TestSuite
+       test
 
     var op1: NativeMPQ
     var op2: NativeMPQ
     var l: NativeMPZ
     var res: NativeMPQ
 
-    init do end
-
-    redef fun before_test do
+    fun before_test is before do
         op1 = new NativeMPQ
         op2 = new NativeMPQ
         l = new NativeMPZ
         res = new NativeMPQ
     end
 
-    redef fun after_test do
+    fun after_test is after do
         op1.finalize
         op2.finalize
         l.finalize
index 8a2c7a0..ad58649 100644 (file)
 # limitations under the License.
 
 # Test suites for module `markdown`
-module test_markdown is test_suite
+module test_markdown is test
 
-import test_suite
 intrude import markdown
 
 class TestMarkdownProcessor
-       super TestSuite
+       test
 
-       fun test_process_empty do
+       fun test_process_empty is test do
                var test = ""
                var exp = ""
                var res = test.md_to_html.write_to_string
                assert res == exp
        end
 
-       fun test_process_tabs do
+       fun test_process_tabs is test do
                var test = """
        some code
 """
@@ -40,14 +39,14 @@ class TestMarkdownProcessor
        end
 
 
-       fun test_process_par1 do
+       fun test_process_par1 is test do
                var test = "test"
                var exp = "<p>test</p>\n"
                var res = test.md_to_html.write_to_string
                assert res == exp
        end
 
-       fun test_process_par2 do
+       fun test_process_par2 is test do
                var test = """
 line1
 line2
@@ -65,7 +64,7 @@ line2</p>
                assert res == exp
        end
 
-       fun test_process_par3 do
+       fun test_process_par3 is test do
                var test = """
 Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
 Aliquam hendrerit mi posuere lectus.
@@ -85,7 +84,7 @@ id sem consectetuer libero luctus adipiscing.</p>
                assert res == exp
        end
 
-       fun test_process_headings_1 do
+       fun test_process_headings_1 is test do
                var test = """
 This is a H1
 =============
@@ -101,7 +100,7 @@ This is a H2
                assert res == exp
        end
 
-       fun test_process_headings_2 do
+       fun test_process_headings_2 is test do
                var test = """
 # This is a H1
 
@@ -117,7 +116,7 @@ This is a H2
                assert res == exp
        end
 
-       fun test_process_headings_3 do
+       fun test_process_headings_3 is test do
                var test = """
 # This is a H1 #
 
@@ -134,7 +133,7 @@ This is a H2
                assert res == exp
        end
 
-       fun test_process_hr do
+       fun test_process_hr is test do
                var test = """
 * * *
 
@@ -151,7 +150,7 @@ This is a H2
                assert res == exp
        end
 
-       fun test_process_bquote1 do
+       fun test_process_bquote1 is test do
                var test = """
 > This is a blockquote with two paragraphs. Lorem ipsum dolor sit amet,
 > consectetuer adipiscing elit. Aliquam hendrerit mi posuere lectus.
@@ -172,7 +171,7 @@ id sem consectetuer libero luctus adipiscing.</p>
                assert res == exp
        end
 
-       fun test_process_bquote2 do
+       fun test_process_bquote2 is test do
                var test = """
 > This is a blockquote with two paragraphs. Lorem ipsum dolor sit amet,
 consectetuer adipiscing elit. Aliquam hendrerit mi posuere lectus.
@@ -193,7 +192,7 @@ id sem consectetuer libero luctus adipiscing.</p>
                assert res == exp
        end
 
-       fun test_process_bquote3 do
+       fun test_process_bquote3 is test do
                var test = """
 > This is the first level of quoting.
 >
@@ -213,7 +212,7 @@ id sem consectetuer libero luctus adipiscing.</p>
                assert res == exp
        end
 
-       fun test_process_list1 do
+       fun test_process_list1 is test do
                var test = """
 *   Red
 *   Green
@@ -229,7 +228,7 @@ id sem consectetuer libero luctus adipiscing.</p>
                assert res == exp
        end
 
-       fun test_process_list2 do
+       fun test_process_list2 is test do
                var test = """
 +   Red
 +   Green
@@ -245,7 +244,7 @@ id sem consectetuer libero luctus adipiscing.</p>
                assert res == exp
        end
 
-       fun test_process_list3 do
+       fun test_process_list3 is test do
                var test = """
 -   Red
 -   Green
@@ -261,7 +260,7 @@ id sem consectetuer libero luctus adipiscing.</p>
                assert res == exp
        end
 
-       fun test_process_list4 do
+       fun test_process_list4 is test do
                var test = """
 1.  Bird
 2.  McHale
@@ -277,7 +276,7 @@ id sem consectetuer libero luctus adipiscing.</p>
                assert res == exp
        end
 
-       fun test_process_list5 do
+       fun test_process_list5 is test do
                var test = """
 3. Bird
 1. McHale
@@ -293,7 +292,7 @@ id sem consectetuer libero luctus adipiscing.</p>
                assert res == exp
        end
 
-       fun test_process_list6 do
+       fun test_process_list6 is test do
                var test = """
 *   Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
     Aliquam hendrerit mi posuere lectus. Vestibulum enim wisi,
@@ -314,7 +313,7 @@ Suspendisse id sem consectetuer libero luctus adipiscing.</li>
                assert res == exp
        end
 
-       fun test_process_list7 do
+       fun test_process_list7 is test do
                var test = """
 *   Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
 Aliquam hendrerit mi posuere lectus. Vestibulum enim wisi,
@@ -335,7 +334,7 @@ Suspendisse id sem consectetuer libero luctus adipiscing.</li>
                assert res == exp
        end
 
-       fun test_process_list8 do
+       fun test_process_list8 is test do
                var test = """
 *   Bird
 
@@ -353,7 +352,7 @@ Suspendisse id sem consectetuer libero luctus adipiscing.</li>
                assert res == exp
        end
 
-       fun test_process_list9 do
+       fun test_process_list9 is test do
                var test = """
 1.  This is a list item with two paragraphs. Lorem ipsum dolor
     sit amet, consectetuer adipiscing elit. Aliquam hendrerit
@@ -382,7 +381,7 @@ sit amet velit.</p>
                assert res == exp
        end
 
-       fun test_process_list10 do
+       fun test_process_list10 is test do
                var test = """
 *   This is a list item with two paragraphs.
 
@@ -407,7 +406,7 @@ sit amet, consectetuer adipiscing elit.</p>
                assert res == exp
        end
 
-       fun test_process_list11 do
+       fun test_process_list11 is test do
                var test = """
 This is a paragraph
 * and this is not a list
@@ -422,7 +421,7 @@ This is a paragraph
                assert res == exp
        end
 
-       fun test_process_list_ext do
+       fun test_process_list_ext is test do
                var test = """
 This is a paragraph
 * and this is not a list
@@ -437,7 +436,7 @@ This is a paragraph
                assert res == exp
        end
 
-       fun test_process_code1 do
+       fun test_process_code1 is test do
                var test = """
 This is a normal paragraph:
 
@@ -451,7 +450,7 @@ This is a normal paragraph:
                assert res == exp
        end
 
-       fun test_process_code2 do
+       fun test_process_code2 is test do
                var test = """
 Here is an example of AppleScript:
 
@@ -478,7 +477,7 @@ end tell
                assert res == exp
        end
 
-       fun test_process_code_ext1 do
+       fun test_process_code_ext1 is test do
                var test = """
 Here is an example of AppleScript:
 ~~~
@@ -506,7 +505,7 @@ end tell
                assert res == exp
        end
 
-       fun test_process_code_ext2 do
+       fun test_process_code_ext2 is test do
                var test = """
 Here is an example of AppleScript:
 ```
@@ -534,7 +533,7 @@ end tell
                assert res == exp
        end
 
-       fun test_process_code_ext3 do
+       fun test_process_code_ext3 is test do
                var proc = new MarkdownProcessor
                proc.ext_mode = false
 
@@ -550,7 +549,7 @@ beep</p>
                assert res == exp
        end
 
-       fun test_process_code_ext4 do
+       fun test_process_code_ext4 is test do
                var test = """
 Here is an example of AppleScript:
     beep
@@ -564,7 +563,7 @@ Here is an example of AppleScript:
                assert res == exp
        end
 
-       fun test_process_code_ext5 do
+       fun test_process_code_ext5 is test do
                var test = """
 ```nit
 print "Hello World!"
@@ -578,7 +577,7 @@ print "Hello World!"
                assert res == exp
        end
 
-       fun test_process_code_ext6 do
+       fun test_process_code_ext6 is test do
                var test = """
 ~~~
 print "Hello"
@@ -597,7 +596,7 @@ print "World"
                assert res == exp
        end
 
-       fun test_process_code_ext7 do
+       fun test_process_code_ext7 is test do
                var test = """
 ~~~
 print "Hello"
@@ -616,7 +615,7 @@ print "World"
                assert res == exp
        end
 
-       fun test_process_nesting1 do
+       fun test_process_nesting1 is test do
                var test = """
 > ## This is a header.
 >
@@ -643,7 +642,7 @@ print "World"
                assert res == exp
        end
 
-       fun test_process_nesting2 do
+       fun test_process_nesting2 is test do
                var test = """
 *   A list item with a blockquote:
 
@@ -664,7 +663,7 @@ inside a list item.</p>
                assert res == exp
        end
 
-       fun test_process_nesting3 do
+       fun test_process_nesting3 is test do
                var test = """
 *   A list item with a code block:
 
@@ -682,7 +681,7 @@ inside a list item.</p>
                assert res == exp
        end
 
-       fun test_process_nesting4 do
+       fun test_process_nesting4 is test do
                var test = """
 *      Tab
        *       Tab
@@ -704,7 +703,7 @@ inside a list item.</p>
        end
 
        # TODO
-       #       fun test_process_nesting5 do
+       #       fun test_process_nesting5 is test do
        #               var test = """
        # *     this
        #
@@ -726,7 +725,7 @@ inside a list item.</p>
        #               assert res == exp
        #       end
 
-       fun test_process_emph1 do
+       fun test_process_emph1 is test do
                var test = """
 *single asterisks*
 
@@ -745,14 +744,14 @@ __double underscores__
                assert res == exp
        end
 
-       fun test_process_emph2 do
+       fun test_process_emph2 is test do
                var test = "un*frigging*believable"
                var exp = "<p>un<em>frigging</em>believable</p>\n"
                var res = test.md_to_html.write_to_string
                assert res == exp
        end
 
-       fun test_process_emph3 do
+       fun test_process_emph3 is test do
                var proc = new MarkdownProcessor
                proc.ext_mode = false
                var test = "Con_cat_this"
@@ -761,14 +760,14 @@ __double underscores__
                assert res == exp
        end
 
-       fun test_process_emph_ext do
+       fun test_process_emph_ext is test do
                var test = "Con_cat_this"
                var exp = "<p>Con_cat_this</p>\n"
                var res = test.md_to_html.write_to_string
                assert res == exp
        end
 
-       fun test_process_xml1 do
+       fun test_process_xml1 is test do
                var test = """
 This is a regular paragraph.
 
@@ -793,7 +792,7 @@ This is another regular paragraph.
                assert res == exp
        end
 
-       fun test_process_xml2 do
+       fun test_process_xml2 is test do
                var test = """
 This is an image <img src="foo/bar" alt="baz"/> in a regular paragraph.
 """
@@ -803,7 +802,7 @@ This is an image <img src="foo/bar" alt="baz"/> in a regular paragraph.
                assert res == exp
        end
 
-       fun test_process_xml3 do
+       fun test_process_xml3 is test do
                var test = """
 <div style=">"/>
 """
@@ -814,7 +813,7 @@ This is an image <img src="foo/bar" alt="baz"/> in a regular paragraph.
                assert res == exp
        end
 
-       fun test_process_xml4 do
+       fun test_process_xml4 is test do
                var test = """
 <p>This is an example of a block element that should be escaped.</p>
 <p>Idem for the second paragraph.</p>
@@ -824,7 +823,7 @@ This is an image <img src="foo/bar" alt="baz"/> in a regular paragraph.
                assert res == exp
        end
 
-       fun test_process_xml5 do
+       fun test_process_xml5 is test do
                var test = """
 # Some more XML tests
 
@@ -844,21 +843,21 @@ With a *md paragraph*!
                assert res == exp
        end
 
-       fun test_process_span_code1 do
+       fun test_process_span_code1 is test do
                var test = "Use the `printf()` function."
                var exp = "<p>Use the <code>printf()</code> function.</p>\n"
                var res = test.md_to_html.write_to_string
                assert res == exp
        end
 
-       fun test_process_span_code2 do
+       fun test_process_span_code2 is test do
                var test = "``There is a literal backtick (`) here.``"
                var exp = "<p><code>There is a literal backtick (`) here.</code></p>\n"
                var res = test.md_to_html.write_to_string
                assert res == exp
        end
 
-       fun test_process_span_code3 do
+       fun test_process_span_code3 is test do
                var test = """
 A single backtick in a code span: `` ` ``
 
@@ -872,42 +871,42 @@ A backtick-delimited string in a code span: `` `foo` ``
                assert res == exp
        end
 
-       fun test_process_span_code4 do
+       fun test_process_span_code4 is test do
                var test = "Please don't use any `<blink>` tags."
                var exp = "<p>Please don't use any <code>&lt;blink&gt;</code> tags.</p>\n"
                var res = test.md_to_html.write_to_string
                assert res == exp
        end
 
-       fun test_process_span_code5 do
+       fun test_process_span_code5 is test do
                var test = "`&#8212;` is the decimal-encoded equivalent of `&mdash;`."
                var exp = "<p><code>&amp;#8212;</code> is the decimal-encoded equivalent of <code>&amp;mdash;</code>.</p>\n"
                var res = test.md_to_html.write_to_string
                assert res == exp
        end
 
-       fun test_process_escape1 do
+       fun test_process_escape1 is test do
                var test = "\\*this text is surrounded by literal asterisks\\*"
                var exp = "<p>*this text is surrounded by literal asterisks*</p>\n"
                var res = test.md_to_html.write_to_string
                assert res == exp
        end
 
-       fun test_process_escape2 do
+       fun test_process_escape2 is test do
                var test = "1986\\. What a great season."
                var exp = "<p>1986. What a great season.</p>\n"
                var res = test.md_to_html.write_to_string
                assert res == exp
        end
 
-       fun test_process_escape3 do
+       fun test_process_escape3 is test do
                var test = "Ben & Lux"
                var exp = "<p>Ben &amp; Lux</p>\n"
                var res = test.md_to_html.write_to_string
                assert res == exp
        end
 
-       fun test_process_link1 do
+       fun test_process_link1 is test do
                var test = """
 This is [an example](http://example.com/ "Title") inline link.
 
@@ -920,14 +919,14 @@ This is [an example](http://example.com/ "Title") inline link.
                assert res == exp
        end
 
-       fun test_process_link2 do
+       fun test_process_link2 is test do
                var test = "See my [About](/about/) page for details."
                var exp = "<p>See my <a href=\"/about/\">About</a> page for details.</p>\n"
                var res = test.md_to_html.write_to_string
                assert res == exp
        end
 
-       fun test_process_link3 do
+       fun test_process_link3 is test do
                var test = """
 This is [an example][id] reference-style link.
 
@@ -949,7 +948,7 @@ Some other lipsum
                assert res == exp
        end
 
-       fun test_process_link4 do
+       fun test_process_link4 is test do
                var test = """
 This is multiple examples: [foo][1], [bar][2], [baz][3].
 
@@ -964,7 +963,7 @@ This is multiple examples: [foo][1], [bar][2], [baz][3].
                assert res == exp
        end
 
-       fun test_process_link5 do
+       fun test_process_link5 is test do
                var test = """
 This is multiple examples: [foo][a], [bar][A], [a].
 
@@ -976,7 +975,7 @@ This is multiple examples: [foo][a], [bar][A], [a].
                assert res == exp
        end
 
-       fun test_process_link6 do
+       fun test_process_link6 is test do
                var test = """
 I get 10 times more traffic from [Google][] than from [Yahoo][] or [MSN][].
 
@@ -990,7 +989,7 @@ I get 10 times more traffic from [Google][] than from [Yahoo][] or [MSN][].
                assert res == exp
        end
 
-       fun test_process_link7 do
+       fun test_process_link7 is test do
                var test = """
 Visit [Daring Fireball][] for more information.
 
@@ -1002,7 +1001,7 @@ Visit [Daring Fireball][] for more information.
                assert res == exp
        end
 
-       fun test_process_link8 do
+       fun test_process_link8 is test do
                var test = """
 This one has a [line
 break].
@@ -1023,7 +1022,7 @@ break</a> with a line-ending space.</p>
        end
 
        # FIXME unignore test once escape strings fixed
-       #       fun test_process_link9 do
+       #       fun test_process_link9 is test do
        #               var test = """
        # Foo [bar][].
        #
@@ -1040,7 +1039,7 @@ break</a> with a line-ending space.</p>
        #               assert res == exp
        #       end
 
-       fun test_process_img1 do
+       fun test_process_img1 is test do
                var test = """
 ![Alt text](/path/to/img.jpg)
 
@@ -1053,7 +1052,7 @@ break</a> with a line-ending space.</p>
                assert res == exp
        end
 
-       fun test_process_img2 do
+       fun test_process_img2 is test do
                var test = """
 ![Alt text][id]
 
@@ -1065,7 +1064,7 @@ break</a> with a line-ending space.</p>
                assert res == exp
        end
 
-       fun test_process_strike do
+       fun test_process_strike is test do
                var proc = new MarkdownProcessor
                proc.ext_mode = false
                var test = "This is how you ~~strike text~~"
@@ -1074,21 +1073,21 @@ break</a> with a line-ending space.</p>
                assert exp == res
        end
 
-       fun test_process_strike_ext do
+       fun test_process_strike_ext is test do
                var test = "This is how you ~~strike text~~"
                var exp = "<p>This is how you <del>strike text</del></p>\n"
                var res = test.md_to_html.write_to_string
                assert exp == res
        end
 
-       fun test_escape_bad_html do
+       fun test_escape_bad_html is test do
                        var test = "-1 if < , +1 if > and 0 otherwise"
                        var exp = "<p>-1 if &lt; , +1 if > and 0 otherwise</p>\n"
                var res = test.md_to_html.write_to_string
                assert exp == res
        end
 
-       fun test_daring_encoding do
+       fun test_daring_encoding is test do
                var test = """
 AT&T has an ampersand in their name.
 
@@ -1129,7 +1128,7 @@ Here's an inline [link](</script?foo=1&bar=2>).
 
        end
 
-       fun test_daring_autolinks do
+       fun test_daring_autolinks is test do
                var test = """
 Link: <http://example.com/>.
 
@@ -1165,7 +1164,7 @@ Auto-links should not occur here: `<http://example.com/>`
                assert res == exp
        end
 
-       fun test_daring_escape do
+       fun test_daring_escape is test do
                var test = """
 These should all get escaped:
 
@@ -1367,7 +1366,7 @@ other Markdown constructs:</p>
                assert res == exp
        end
 
-       fun test_daring_blockquotes do
+       fun test_daring_blockquotes is test do
                var test = """
 > Example:
 >
@@ -1400,7 +1399,7 @@ other Markdown constructs:</p>
                assert res == exp
        end
 
-       fun test_daring_code_blocks do
+       fun test_daring_code_blocks is test do
                var test = """
        code block on the first line
 
@@ -1436,7 +1435,7 @@ all contain trailing spaces
                assert res == exp
        end
 
-       fun test_daring_code_spans do
+       fun test_daring_code_spans is test do
                var test = """
 `<test a="` content of attribute `">`
 
@@ -1454,7 +1453,7 @@ Here's how you put `` `backticks` `` in a code span.
                assert res == exp
        end
 
-       fun test_daring_pars do
+       fun test_daring_pars is test do
                var proc = new MarkdownProcessor
                proc.ext_mode = false
 
@@ -1482,7 +1481,7 @@ list item.</p>
                assert res == exp
        end
 
-       fun test_daring_rules do
+       fun test_daring_rules is test do
                var test = """
 Dashes:
 
@@ -1598,7 +1597,7 @@ _ _ _
                assert res == exp
        end
 
-       fun test_daring_images do
+       fun test_daring_images is test do
                var test = """
 ![Alt text](/path/to/img.jpg)
 
@@ -1645,7 +1644,7 @@ Inline within a paragraph: [alt text](/url/).
                assert res == exp
        end
 
-       fun test_daring_inline_html1 do
+       fun test_daring_inline_html1 is test do
                var test = """
 Here's a simple block:
 
@@ -1768,7 +1767,7 @@ Blah
                assert res == exp
        end
 
-       fun test_daring_inline_html2 do
+       fun test_daring_inline_html2 is test do
                var test = """
 Simple block on one line:
 
@@ -1831,7 +1830,7 @@ foo
                assert res == exp
        end
 
-       fun test_daring_inline_html3 do
+       fun test_daring_inline_html3 is test do
                var test = """
 Paragraph one.
 
@@ -1862,7 +1861,7 @@ The end.
                assert res == exp
        end
 
-       fun test_daring_links1 do
+       fun test_daring_links1 is test do
                var test = """
 Just a [URL](/url/).
 
@@ -1908,7 +1907,7 @@ Just a [URL](/url/).
                assert res == exp
        end
 
-       fun test_daring_links2 do
+       fun test_daring_links2 is test do
                var test = """
 Foo [bar] [1].
 
@@ -2017,7 +2016,7 @@ breaks</a> across lines, but with a line-ending space.</p>
                assert res == exp
        end
 
-       fun test_daring_links3 do
+       fun test_daring_links3 is test do
                var test = """
 This is the [simple case].
 
@@ -2053,7 +2052,7 @@ break</a> with a line-ending space.</p>
                assert res == exp
        end
 
-       fun test_daring_nested do
+       fun test_daring_nested is test do
                var test = """
 > foo
 >
@@ -2075,7 +2074,7 @@ break</a> with a line-ending space.</p>
                assert res == exp
        end
 
-       fun test_daring_list do
+       fun test_daring_list is test do
                var test = """
 ## Unordered
 
@@ -2332,7 +2331,7 @@ back.</p>
                assert res == exp
        end
 
-       fun test_daring_strong_em do
+       fun test_daring_strong_em is test do
                var test = """
 ***This is strong and em.***
 
@@ -2353,7 +2352,7 @@ So is ___this___ word.
                assert res == exp
        end
 
-       fun test_daring_tabs do
+       fun test_daring_tabs is test do
                var test = """
 +      this is a list item
        indented with tabs
@@ -2405,7 +2404,7 @@ indented with spaces</p>
                assert res == exp
        end
 
-       fun test_daring_tidyness do
+       fun test_daring_tidyness is test do
                var test = """
 > A list within a blockquote:
 >
@@ -2432,19 +2431,19 @@ indented with spaces</p>
 end
 
 class TestBlock
-       super TestSuite
+       test
 
        # A dummy location for testing purposes.
        var loc = new MDLocation(0, 0, 0, 0)
 
-       fun test_has_blocks do
+       fun test_has_blocks is test do
                var subject = new MDBlock(loc)
                assert not subject.has_blocks
                subject.first_block = new MDBlock(loc)
                assert subject.has_blocks
        end
 
-       fun test_count_blocks do
+       fun test_count_blocks is test do
                var subject = new MDBlock(loc)
                assert subject.count_blocks == 0
                subject.first_block = new MDBlock(loc)
@@ -2453,14 +2452,14 @@ class TestBlock
                assert subject.count_blocks == 2
        end
 
-       fun test_has_lines do
+       fun test_has_lines is test do
                var subject = new MDBlock(loc)
                assert not subject.has_lines
                subject.first_line = new MDLine(loc, "")
                assert subject.has_lines
        end
 
-       fun test_count_lines do
+       fun test_count_lines is test do
                var subject = new MDBlock(loc)
                assert subject.count_lines == 0
                subject.first_line = new MDLine(loc, "")
@@ -2469,7 +2468,7 @@ class TestBlock
                assert subject.count_lines == 2
        end
 
-       fun test_split do
+       fun test_split is test do
                var line1 = new MDLine(loc, "line1")
                var line2 = new MDLine(loc, "line2")
                var line3 = new MDLine(loc, "line3")
@@ -2487,7 +2486,7 @@ class TestBlock
                assert block.last_line == line2
        end
 
-       fun test_add_line do
+       fun test_add_line is test do
                var subject = new MDBlock(loc)
                assert subject.count_lines == 0
                subject.add_line new MDLine(loc, "")
@@ -2496,7 +2495,7 @@ class TestBlock
                assert subject.count_lines == 2
        end
 
-       fun test_remove_line do
+       fun test_remove_line is test do
                var line1 = new MDLine(loc, "line1")
                var line2 = new MDLine(loc, "line2")
                var line3 = new MDLine(loc, "line3")
@@ -2512,7 +2511,7 @@ class TestBlock
                assert subject.last_line == line3
        end
 
-       fun test_transform_headline1 do
+       fun test_transform_headline1 is test do
                var subject = new MDBlock(loc)
                var kind = new BlockHeadline(subject)
                subject.add_line new MDLine(loc, " #   Title 1   ")
@@ -2521,7 +2520,7 @@ class TestBlock
                assert subject.first_line.value == "Title 1"
        end
 
-       fun test_transform_headline2 do
+       fun test_transform_headline2 is test do
                var subject = new MDBlock(loc)
                var kind = new BlockHeadline(subject)
                subject.add_line new MDLine(loc, " #####Title 5   ")
@@ -2530,7 +2529,7 @@ class TestBlock
                assert subject.first_line.value == "Title 5"
        end
 
-       fun test_remove_quote_prefix do
+       fun test_remove_quote_prefix is test do
                var subject = new MDBlock(loc)
                var kind = new BlockQuote(subject)
                subject.add_line new MDLine(loc, " > line 1")
@@ -2542,7 +2541,7 @@ class TestBlock
                assert subject.first_line.next.next.value == "line 3"
        end
 
-       fun test_remove_leading_empty_lines_1 do
+       fun test_remove_leading_empty_lines_1 is test do
                var block = new MDBlock(loc)
                block.add_line new MDLine(loc, "")
                block.add_line new MDLine(loc, "")
@@ -2554,14 +2553,14 @@ class TestBlock
                assert block.first_line.value == "   text"
        end
 
-       fun test_remove_leading_empty_lines_2 do
+       fun test_remove_leading_empty_lines_2 is test do
                var block = new MDBlock(loc)
                block.add_line new MDLine(loc, "   text")
                block.remove_leading_empty_lines
                assert block.first_line.value == "   text"
        end
 
-       fun test_remove_trailing_empty_lines_1 do
+       fun test_remove_trailing_empty_lines_1 is test do
                var block = new MDBlock(loc)
                block.add_line new MDLine(loc, "")
                block.add_line new MDLine(loc, "text")
@@ -2573,14 +2572,14 @@ class TestBlock
                assert block.last_line.value == "text"
        end
 
-       fun test_remove_trailing_empty_lines_2 do
+       fun test_remove_trailing_empty_lines_2 is test do
                var block = new MDBlock(loc)
                block.add_line new MDLine(loc, "text  ")
                assert not block.remove_trailing_empty_lines
                assert block.last_line.value == "text  "
        end
 
-       fun test_remove_surrounding_empty_lines do
+       fun test_remove_surrounding_empty_lines is test do
                var block = new MDBlock(loc)
                block.add_line new MDLine(loc, "")
                block.add_line new MDLine(loc, "text")
@@ -2595,14 +2594,14 @@ class TestBlock
 end
 
 class TestLine
-       super TestSuite
+       test
 
        # A dummy location for testing purposes.
        var loc = new MDLocation(0, 0, 0, 0)
 
        var subject: MDLine
 
-       fun test_is_empty do
+       fun test_is_empty is test do
                subject = new MDLine(loc, "")
                assert subject.is_empty
                subject = new MDLine(loc, "    ")
@@ -2613,7 +2612,7 @@ class TestLine
                assert not subject.is_empty
        end
 
-       fun test_leading do
+       fun test_leading is test do
                subject = new MDLine(loc, "")
                assert subject.leading == 0
                subject = new MDLine(loc, "    ")
@@ -2624,7 +2623,7 @@ class TestLine
                assert subject.leading == 4
        end
 
-       fun test_trailing do
+       fun test_trailing is test do
                subject = new MDLine(loc, "")
                assert subject.trailing == 0
                subject = new MDLine(loc, "    ")
@@ -2635,7 +2634,7 @@ class TestLine
                assert subject.trailing == 1
        end
 
-       fun test_line_type do
+       fun test_line_type is test do
                var v = new MarkdownProcessor
                subject = new MDLine(loc, "")
                assert v.line_kind(subject) isa LineEmpty
@@ -2681,7 +2680,7 @@ class TestLine
                assert v.line_kind(subject) isa LineOList
        end
 
-       fun test_line_type_ext do
+       fun test_line_type_ext is test do
                var v = new MarkdownProcessor
                subject = new MDLine(loc, "  ~~~")
                assert v.line_kind(subject) isa LineFence
@@ -2691,7 +2690,7 @@ class TestLine
                assert v.line_kind(subject) isa LineFence
        end
 
-       fun test_count_chars do
+       fun test_count_chars is test do
                subject = new MDLine(loc, "")
                assert subject.count_chars('*') == 0
                subject = new MDLine(loc, "* ")
@@ -2704,7 +2703,7 @@ class TestLine
                assert subject.count_chars('*') == 0
        end
 
-       fun test_count_chars_start do
+       fun test_count_chars_start is test do
                subject = new MDLine(loc, "")
                assert subject.count_chars_start('*') == 0
                subject = new MDLine(loc, "* ")
@@ -2719,9 +2718,9 @@ class TestLine
 end
 
 class TestHTMLDecorator
-       super TestSuite
+       test
 
-       fun test_headlines do
+       fun test_headlines is test do
                var test = """
 # **a**
 ## a.a
@@ -2760,9 +2759,9 @@ c:c
 end
 
 class TestTokenLocation
-       super TestSuite
+       test
 
-       fun test_token_location1 do
+       fun test_token_location1 is test do
                var string = "**Hello** `World`"
                var stack =  [
                        "TokenStrongStar at 1,1--1,1",
@@ -2772,7 +2771,7 @@ class TestTokenLocation
                (new TestTokenProcessor(stack)).process(string)
        end
 
-       fun test_token_location2 do
+       fun test_token_location2 is test do
                var string = "**Hello**\n`World`\n*Bonjour*\n[le monde]()"
                var stack =  [
                        "TokenStrongStar at 1,1--1,1",
@@ -2785,7 +2784,7 @@ class TestTokenLocation
                (new TestTokenProcessor(stack)).process(string)
        end
 
-       fun test_token_location3 do
+       fun test_token_location3 is test do
                var string = """**Hello**
                `World`
                *Bonjour*
@@ -2801,7 +2800,7 @@ class TestTokenLocation
                (new TestTokenProcessor(stack)).process(string)
        end
 
-       fun test_token_location4 do
+       fun test_token_location4 is test do
                var string = "**Hello**\n\n`World`"
                var stack =  [
                        "TokenStrongStar at 1,1--1,1",
@@ -2811,7 +2810,7 @@ class TestTokenLocation
                (new TestTokenProcessor(stack)).process(string)
        end
 
-       fun test_token_location5 do
+       fun test_token_location5 is test do
                var string = "# *Title1*\n\n# *Title2*"
                var stack =  [
                        "TokenEmStar at 1,3--1,3",
@@ -2841,11 +2840,11 @@ class TestTokenProcessor
 end
 
 class TestBlockLocation
-       super TestSuite
+       test
 
        var proc = new MarkdownProcessor
 
-       fun test_block_location1 do
+       fun test_block_location1 is test do
                var stack = [
                        "BlockHeadline: 1,1--1,8",
                        "BlockListItem: 2,1--2,6",
@@ -2857,7 +2856,7 @@ class TestBlockLocation
                proc.process(string)
        end
 
-       fun test_block_location2 do
+       fun test_block_location2 is test do
                var stack = [
                        "BlockHeadline: 1,1--1,11",
                        "BlockFence: 3,1--5,4",
@@ -2875,7 +2874,7 @@ some code
                proc.process(string)
        end
 
-       fun test_block_location3 do
+       fun test_block_location3 is test do
                var stack = [
                        "BlockHeadline: 1,1--1,8",
                        "BlockHeadline: 3,1--3,10"]
index 5c4fb7e..133493d 100644 (file)
 # limitations under the License.
 
 # Test suites for module `markdown`
-module test_wikilinks is test_suite
+module test_wikilinks is test
 
 import test_markdown
 import wikilinks
 
 class TestTokenWikilink
-       super TestSuite
+       test
 
-       fun test_token_location1 do
+       fun test_token_location1 is test do
                var string = "[[wikilink]]"
                var stack =  ["TokenWikiLink at 1,1--1,1"]
                (new TestTokenProcessor(stack)).process(string)
        end
 
-       fun test_token_location2 do
+       fun test_token_location2 is test do
                var string = "Hello [[World]]"
                var stack =  ["TokenWikiLink at 1,7--1,7"]
                (new TestTokenProcessor(stack)).process(string)
        end
 
-       fun test_token_location3 do
+       fun test_token_location3 is test do
                var string = "\nHello\nworld [[wikilink]] !"
                var stack =  ["TokenWikiLink at 3,7--3,7"]
                (new TestTokenProcessor(stack)).process(string)
        end
 
-       fun test_token_location4 do
+       fun test_token_location4 is test do
                var string = "[[link1]]\n\n[[link2]]"
                var stack =  [
                        "TokenWikiLink at 1,1--1,1",
@@ -47,7 +47,7 @@ class TestTokenWikilink
                (new TestTokenProcessor(stack)).process(string)
        end
 
-       fun test_token_location5 do
+       fun test_token_location5 is test do
                var string = "[[link1]]\n[[link2]]"
                var stack =  [
                        "TokenWikiLink at 1,1--1,1",
@@ -55,7 +55,7 @@ class TestTokenWikilink
                (new TestTokenProcessor(stack)).process(string)
        end
 
-       fun test_token_location6 do
+       fun test_token_location6 is test do
                var string = """
 [[doc: github]]
 
index 27c98c4..12c7b57 100644 (file)
@@ -9,13 +9,12 @@
 # another product.
 
 # Test suite for `attributes_impl`.
-module test_attributes_impl is test_suite
+module test_attributes_impl is test
 
-import test_suite
 import sax::helpers::attributes_impl
 
 class TestAttributesImpl
-       super TestSuite
+       test
 
        private fun sample: AttributesImpl do
                var subject = new AttributesImpl
@@ -32,7 +31,7 @@ class TestAttributesImpl
                return subject
        end
 
-       fun test_length do
+       fun test_length is test do
                var subject = new AttributesImpl
 
                assert 0 == subject.length
@@ -47,7 +46,7 @@ class TestAttributesImpl
                assert 0 == subject.length
        end
 
-       fun test_uri do
+       fun test_uri is test do
                var subject = sample
 
                assert "http://example.com/" == subject.uri(0)
@@ -60,7 +59,7 @@ class TestAttributesImpl
                assert subject.uri(0) == null
        end
 
-       fun test_local_name do
+       fun test_local_name is test do
                var subject = sample
 
                assert "bar" == subject.local_name(0)
@@ -73,7 +72,7 @@ class TestAttributesImpl
                assert subject.local_name(0) == null
        end
 
-       fun test_qname do
+       fun test_qname is test do
                var subject = sample
 
                assert "foo:bar" == subject.qname(0)
@@ -86,7 +85,7 @@ class TestAttributesImpl
                assert subject.qname(0) == null
        end
 
-       fun test_type_of do
+       fun test_type_of is test do
                var subject = sample
 
                assert "CDATA" == subject.type_of(0)
@@ -99,7 +98,7 @@ class TestAttributesImpl
                assert subject.type_of(0) == null
        end
 
-       fun test_type_of_qname do
+       fun test_type_of_qname is test do
                var subject = sample
 
                assert "CDATA" == subject.type_of("foo:bar")
@@ -111,7 +110,7 @@ class TestAttributesImpl
                assert subject.type_of("xml:lang") == null
        end
 
-       fun test_value_of do
+       fun test_value_of is test do
                var subject = sample
 
                assert "baz" == subject.value_of(0)
@@ -124,7 +123,7 @@ class TestAttributesImpl
                assert subject.value_of(0) == null
        end
 
-       fun test_value_of_qname do
+       fun test_value_of_qname is test do
                var subject = sample
 
                assert "baz" == subject.value_of("foo:bar")
@@ -136,7 +135,7 @@ class TestAttributesImpl
                assert subject.value_of("xml:lang") == null
        end
 
-       fun test_index_ns do
+       fun test_index_ns is test do
                var subject = sample
 
                assert 0 == subject.index_ns("http://example.com/", "bar")
@@ -148,7 +147,7 @@ class TestAttributesImpl
                assert -1 == subject.index_ns("http://example.com/", "bar")
        end
 
-       fun test_index_of do
+       fun test_index_of is test do
                var subject = sample
 
                assert 0 == subject.index_of("foo:bar")
@@ -160,7 +159,7 @@ class TestAttributesImpl
                assert -1 == subject.index_of("foo:bar")
        end
 
-       fun test_type_ns do
+       fun test_type_ns is test do
                var subject = sample
 
                assert "CDATA" == subject.type_ns("http://example.com/", "bar")
@@ -172,7 +171,7 @@ class TestAttributesImpl
                assert subject.type_ns("http://example.com/", "bar") == null
        end
 
-       fun test_value_ns do
+       fun test_value_ns is test do
                var subject = sample
 
                assert "baz" == subject.value_ns("http://example.com/", "bar")
@@ -184,7 +183,7 @@ class TestAttributesImpl
                assert subject.value_ns("http://example.com/", "bar") == null
        end
 
-       fun test_attributes_set do
+       fun test_attributes_set is test do
                var subject = sample
                var subject2 = new AttributesImpl
 
@@ -195,7 +194,7 @@ class TestAttributesImpl
                assert subject.length == 4
        end
 
-       fun test_set do
+       fun test_set is test do
                var subject = sample
 
                subject.set(1, "urn:is:not:often:used", "i-am_ME", "i-am_ME", "ID",
@@ -205,7 +204,7 @@ class TestAttributesImpl
                assert "NMTOKENS" == subject.type_of(0)
        end
 
-       fun test_remove_at do
+       fun test_remove_at is test do
                var subject = sample
 
                subject.remove_at(1)
@@ -213,7 +212,7 @@ class TestAttributesImpl
                assert "xml:lang" == subject.qname(1)
        end
 
-       fun test_uri_set do
+       fun test_uri_set is test do
                var subject = sample
 
                subject.uri(0) = "https://example.org/serious"
@@ -222,7 +221,7 @@ class TestAttributesImpl
                assert "https://example.org/serious" == subject.uri(0)
        end
 
-       fun test_local_name_set do
+       fun test_local_name_set is test do
                var subject = sample
 
                subject.local_name(0) = "trololol"
@@ -231,7 +230,7 @@ class TestAttributesImpl
                assert "ImYou42" == subject.local_name(1)
        end
 
-       fun test_qname_set do
+       fun test_qname_set is test do
                var subject = sample
 
                subject.qname(0) = "go-to:bar"
@@ -240,7 +239,7 @@ class TestAttributesImpl
                assert "yo:i-am_ME" == subject.qname(1)
        end
 
-       fun test_type_of_set do
+       fun test_type_of_set is test do
                var subject = sample
 
                subject.type_of(0) = "NMTOKENS"
@@ -249,7 +248,7 @@ class TestAttributesImpl
                assert "ENTITY" == subject.type_of(1)
        end
 
-       fun test_value_of_set do
+       fun test_value_of_set is test do
                var subject = sample
 
                subject.value_of(0) = "buz"
index 3892e12..ed25c75 100644 (file)
@@ -9,13 +9,12 @@
 # another product.
 
 # Test suite for `namespace_support`.
-module test_namespace_support is test_suite
+module test_namespace_support is test
 
-import test_suite
 import sax::helpers::namespace_support
 
 class TestNamespaceSupport
-       super TestSuite
+       test
 
        private fun sample: NamespaceSupport do
                var subject = new NamespaceSupport
@@ -26,7 +25,7 @@ class TestNamespaceSupport
                return subject
        end
 
-       fun test_reset do
+       fun test_reset is test do
                var subject = sample
 
                subject.reset
@@ -37,7 +36,7 @@ class TestNamespaceSupport
                assert 2 == subject.prefixes.length
        end
 
-       fun test_push_context_override_default do
+       fun test_push_context_override_default is test do
                var subject = sample
 
                subject.push_context
@@ -51,7 +50,7 @@ class TestNamespaceSupport
                assert 3 == subject.prefixes.length
        end
 
-       fun test_push_context_override_dc do
+       fun test_push_context_override_dc is test do
                var subject = sample
 
                subject.push_context
@@ -64,7 +63,7 @@ class TestNamespaceSupport
                assert 3 == subject.prefixes.length
        end
 
-       fun test_push_context_undeclare do
+       fun test_push_context_undeclare is test do
                var subject = sample
 
                subject.push_context
@@ -74,7 +73,7 @@ class TestNamespaceSupport
                assert 2 == subject.prefixes.length
        end
 
-       fun test_pop_context do
+       fun test_pop_context is test do
                var subject = sample
 
                subject.pop_context
@@ -86,7 +85,7 @@ class TestNamespaceSupport
 
        #fun test_declare_prefix # SEE: test_push_context_*
 
-       fun test_process_name do
+       fun test_process_name is test do
                var subject = sample
                var parts = new Array[String]
 
@@ -104,7 +103,7 @@ class TestNamespaceSupport
                assert ["", "p", "p"] == subject.process_name("p", parts, true)
        end
 
-       fun test_process_name_xmlns do
+       fun test_process_name_xmlns is test do
                var subject = sample
                var parts = new Array[String].with_capacity(3)
 
@@ -112,7 +111,7 @@ class TestNamespaceSupport
                assert ["http://www.w3.org/1999/xhtml", "xmlns", "xmlns"] == subject.process_name("xmlns", parts, false)
        end
 
-       fun test_declare_prefix_illegal do
+       fun test_declare_prefix_illegal is test do
                var subject = sample
 
                assert not subject.declare_prefix("xml", "http://example.org")
@@ -122,7 +121,7 @@ class TestNamespaceSupport
                assert 2 == subject.declared_prefixes.length
        end
 
-       fun test_uri do
+       fun test_uri is test do
                var subject = sample
 
                assert "http://www.w3.org/1999/xhtml" == subject.uri("")
@@ -131,7 +130,7 @@ class TestNamespaceSupport
                assert subject.uri("foo") == null
        end
 
-       fun test_prefixes do
+       fun test_prefixes is test do
                var res = sample.prefixes
 
                assert 3 == res.length else
@@ -142,7 +141,7 @@ class TestNamespaceSupport
                assert res.has("xmlns")
        end
 
-       fun test_prefix do
+       fun test_prefix is test do
                var subject = sample
 
                assert subject.prefix("http://www.w3.org/1999/xhtml") == null
@@ -151,7 +150,7 @@ class TestNamespaceSupport
                assert subject.prefix("https://example.org/serious") == null
        end
 
-       fun test_prefixes_of do
+       fun test_prefixes_of is test do
                var subject = sample
                var res: Collection[String]
 
@@ -169,7 +168,7 @@ class TestNamespaceSupport
                assert res.has_all(["dc", "dc2"])
        end
 
-       fun test_declared_prefixes do
+       fun test_declared_prefixes is test do
                var res = sample.declared_prefixes
 
                assert 2 == res.length else
index c4afbbf..98ddc26 100644 (file)
@@ -9,7 +9,7 @@
 # another product.
 
 # Tests for SAXophoNit
-module test_saxophonit is test_suite
+module test_saxophonit is test
 
 import sax::helpers::sax_locator_impl
 import sax::helpers::attributes_impl
@@ -18,10 +18,11 @@ import saxophonit::testing
 
 class TestSaxophonit
        super SAXTestSuite
+       test
 
        redef fun create_reader do return new XophonReader
 
-       fun test_empty do
+       fun test_empty is test do
                before_test
                parse_string("<foo />")
                expected.document_locator = new SAXLocatorImpl
@@ -32,7 +33,7 @@ class TestSaxophonit
                assert_equals
        end
 
-       fun test_simple_element do
+       fun test_simple_element is test do
                before_test
                parse_string("<foo>bar</foo>")
                expected.document_locator = new SAXLocatorImpl
@@ -44,7 +45,7 @@ class TestSaxophonit
                assert_equals
        end
 
-       fun test_type_mismatch do
+       fun test_type_mismatch is test do
                before_test
                parse_string("<a></b>")
                expected.document_locator = new SAXLocatorImpl
@@ -57,7 +58,7 @@ class TestSaxophonit
                assert_equals
        end
 
-       fun test_attributes do
+       fun test_attributes is test do
                var atts = new AttributesImpl
 
                before_test
@@ -72,7 +73,7 @@ class TestSaxophonit
                assert_equals
        end
 
-       fun test_nested do
+       fun test_nested is test do
                var atts = new AttributesImpl
 
                before_test
@@ -90,7 +91,7 @@ class TestSaxophonit
                assert_equals
        end
 
-       fun test_xmldecl do
+       fun test_xmldecl is test do
                before_test
                parse_string("<?xml version='1.0'?><foo />")
                expected.document_locator = new SAXLocatorImpl
@@ -101,7 +102,7 @@ class TestSaxophonit
                assert_equals
        end
 
-       fun test_xmldecl_encoding do
+       fun test_xmldecl_encoding is test do
                before_test
                parse_string("<?xml version=\"1.0\" encoding='utf-8'?><foo />")
                expected.document_locator = new SAXLocatorImpl
@@ -112,7 +113,7 @@ class TestSaxophonit
                assert_equals
        end
 
-       fun test_xmldecl_standalone do
+       fun test_xmldecl_standalone is test do
                before_test
                parse_string("<?xml version='1.0' standalone=\"yes\"?><foo />")
                expected.document_locator = new SAXLocatorImpl
@@ -123,7 +124,7 @@ class TestSaxophonit
                assert_equals
        end
 
-       fun test_xmldecl_both do
+       fun test_xmldecl_both is test do
                before_test
                parse_string("<?xml version='1.0' encoding='utf-8' standalone=\"yes\"?><foo />")
                expected.document_locator = new SAXLocatorImpl
@@ -134,7 +135,7 @@ class TestSaxophonit
                assert_equals
        end
 
-       fun test_reference_builtin do
+       fun test_reference_builtin is test do
                before_test
                parse_string("<foo>&amp;&quot;&apos;&lt;&gt;&#48;&#x30;&#x03A;</foo>")
                expected.document_locator = new SAXLocatorImpl
@@ -153,7 +154,7 @@ class TestSaxophonit
                assert_equals
        end
 
-       fun test_comments do
+       fun test_comments is test do
                # TODO For the moment, comments are simply ignored.
                before_test
                parse_string("<!-- I--><foo>bar<!--l-i-k-e--></foo><!--comments    -->")
@@ -166,7 +167,7 @@ class TestSaxophonit
                assert_equals
        end
 
-       fun test_ns_simple do
+       fun test_ns_simple is test do
                before_test
                parse_string("<foo:bar xmlns:foo='https://s.exemple.org' />")
                expected.document_locator = new SAXLocatorImpl
@@ -178,7 +179,7 @@ class TestSaxophonit
                assert_equals
        end
 
-       fun test_ns_prefix do
+       fun test_ns_prefix is test do
                var atts = new AttributesImpl
 
                before_test
@@ -194,7 +195,7 @@ class TestSaxophonit
                assert_equals
        end
 
-       fun test_mixed do
+       fun test_mixed is test do
                var atts = new AttributesImpl
 
                # TODO For the moment, ignorable white space is not detected.
index c2ace75..c9c7fc1 100644 (file)
@@ -9,13 +9,12 @@
 # another product.
 
 # Test suite for `testing`.
-module test_testing is test_suite
+module test_testing is test
 
 import saxophonit::testing
-import test_suite
 
 class TestSaxEventLogger
-       super TestSuite
+       test
 
        # Constants for diff formatting.
 
@@ -40,8 +39,7 @@ class TestSaxEventLogger
 
        private var init_done: Bool = false
 
-       redef fun before_test do
-               super
+       fun before_test is before do
                if not init_done then
                        default = a.term_default
                        ins = a.term_insertion
@@ -64,19 +62,19 @@ class TestSaxEventLogger
                end
        end
 
-       fun test_diff_empty do
+       fun test_diff_empty is test do
                assert "" == a.diff(b).to_s
                assert "" == b.diff(a).to_s
        end
 
-       fun test_diff_equal1 do
+       fun test_diff_equal1 is test do
                b.start_document
                a.start_document
                assert "" == a.diff(b).to_s
                assert "" == b.diff(a).to_s
        end
 
-       fun test_diff_equal2 do
+       fun test_diff_equal2 is test do
                b.start_document
                b.end_document
                a.start_document
@@ -85,7 +83,7 @@ class TestSaxEventLogger
                assert "" == b.diff(a).to_s
        end
 
-       fun test_diff_insertion do
+       fun test_diff_insertion is test do
                var exp: String
                var test: String
 
@@ -115,7 +113,7 @@ class TestSaxEventLogger
                assert_equals(2, exp, test)
        end
 
-       fun test_diff_edition do
+       fun test_diff_edition is test do
                var exp: String
                var test: String
 
index cc69c83..a5af113 100644 (file)
@@ -17,7 +17,6 @@ import sax::helpers::xml_filter_impl
 import sax::ext::decl_handler
 import sax::ext::lexical_handler
 import console
-import test_suite
 
 # A filter that internally log events it recieves.
 #
@@ -532,7 +531,6 @@ end
 
 # Base class for test suites on a SAX reader.
 abstract class SAXTestSuite
-       super TestSuite
 
        # Logger of the expected event sequence.
        var expected = new SAXEventLogger
@@ -545,8 +543,7 @@ abstract class SAXTestSuite
 
        private var init_done: Bool = false
 
-       redef fun before_test do
-               super
+       fun before_test is before do
                if not init_done then
                        reader = create_reader
                        actual.parent = reader
index b2854e6..c6cd512 100644 (file)
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-module test_macro is test_suite
+module test_macro is test
 
-import test_suite
 import macro
 
 class TestTemplateString
-       super TestSuite
+       test
 
-       fun test_tpl_parse_1 do
+       fun test_tpl_parse_1 is test do
                var tpl = """
 <!DOCTYPE html>
 <html lang="en">
@@ -37,7 +36,7 @@ class TestTemplateString
                assert res == tpl
        end
 
-       fun test_tpl_parse_2 do
+       fun test_tpl_parse_2 is test do
                var tpl = """
 <!DOCTYPE html>
 <html lang="en">
@@ -54,7 +53,7 @@ class TestTemplateString
                assert res == tpl
        end
 
-       fun test_tpl_parse_3 do
+       fun test_tpl_parse_3 is test do
                var tpl = """
 <!DOCTYPE html>
 <html lang="en">
@@ -67,7 +66,7 @@ class TestTemplateString
                assert res == tpl
        end
 
-       fun test_tpl_parse_4 do
+       fun test_tpl_parse_4 is test do
                var tpl = """
 <!DOCTYPE html>
 <html lang="en">
@@ -83,7 +82,7 @@ class TestTemplateString
                assert res == tpl
        end
 
-       fun test_tpl_parse_5 do
+       fun test_tpl_parse_5 is test do
                var tpl = """
 <!DOCTYPE html>
 <html lang="en">
@@ -100,7 +99,7 @@ class TestTemplateString
                assert res == tpl
        end
 
-       fun test_tpl_parse_6 do
+       fun test_tpl_parse_6 is test do
                var tpl = """
 <!DOCTYPE html>
 <html lang="en">
@@ -116,7 +115,7 @@ class TestTemplateString
                assert res == tpl
        end
 
-       fun test_tpl_replace_1 do
+       fun test_tpl_replace_1 is test do
                var tpl = """
 <!DOCTYPE html>
 <html lang="en">
@@ -145,7 +144,7 @@ class TestTemplateString
                assert res == exp
        end
 
-       fun test_tpl_replace_2 do
+       fun test_tpl_replace_2 is test do
                var tpl = """
 <!DOCTYPE html>
 <html lang="en">
@@ -175,7 +174,7 @@ class TestTemplateString
                assert res == exp
        end
 
-       fun test_tpl_replace_3 do
+       fun test_tpl_replace_3 is test do
                var tpl = """
 <!DOCTYPE html>
 <html lang="en">