• unit test words

    From axtens@21:1/5 to All on Tue May 24 21:16:03 2022
    With the thought of writing a track on Exercism.org for 8th, are there any unit test words for Forth-family languages?

    -- Bruce

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From minforth@arcor.de@21:1/5 to axtens on Tue May 24 22:41:09 2022
    axtens schrieb am Mittwoch, 25. Mai 2022 um 06:16:04 UTC+2:
    With the thought of writing a track on Exercism.org for 8th, are there any unit test words for Forth-family languages?


    There is a test suite for _standard_ Forth wordsets. I would say 8th is non-standard.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Anton Ertl@21:1/5 to axtens on Wed May 25 05:43:16 2022
    axtens <bruce.axtens@gmail.com> writes:
    With the thought of writing a track on Exercism.org for 8th, are there any unit test words for Forth-family languages?

    The Hayes tester and its descendent, ttester. Gerry Jackson maintains
    a suite of unit tests for the standard words:

    https://github.com/gerryjackson/forth2012-test-suite

    where you can see usage examples.

    - anton
    --
    M. Anton Ertl http://www.complang.tuwien.ac.at/anton/home.html
    comp.lang.forth FAQs: http://www.complang.tuwien.ac.at/forth/faq/toc.html
    New standard: http://www.forth200x.org/forth200x.html
    EuroForth 2021: https://euro.theforth.net/2021

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From axtens@21:1/5 to minf...@arcor.de on Tue May 24 23:33:37 2022
    On Wednesday, 25 May 2022 at 1:41:11 pm UTC+8, minf...@arcor.de wrote:
    . I would say 8th is non-standard.
    Agreed. However, unless someone takes on the challenge of writing a standard Forth track at Exercism, the only example of a forth-ish language there will be 8th.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From axtens@21:1/5 to axtens on Wed May 25 00:35:54 2022
    On Wednesday, 25 May 2022 at 2:33:39 pm UTC+8, axtens wrote:
    On Wednesday, 25 May 2022 at 1:41:11 pm UTC+8, minf...@arcor.de wrote:
    . I would say 8th is non-standard.
    The other problem is finding a Forth standard that everyone will, if not "agree to", at least will consent to.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From minforth@arcor.de@21:1/5 to axtens on Wed May 25 01:19:43 2022
    axtens schrieb am Mittwoch, 25. Mai 2022 um 09:35:55 UTC+2:
    On Wednesday, 25 May 2022 at 2:33:39 pm UTC+8, axtens wrote:
    On Wednesday, 25 May 2022 at 1:41:11 pm UTC+8, minf...@arcor.de wrote:
    . I would say 8th is non-standard.
    The other problem is finding a Forth standard that everyone will, if not "agree to", at least will consent to.

    IMO the Forth core wordset and its associated test programs tester.fr and core.fr
    should run on any Forth system. It is the "agreed" bare minimum.

    If it does not, the system is incomplete or presents a diverging dialect.

    Bear in mind that more complete Forths are practically always full of
    very individual (application domain specific) language extensions.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From minforth@arcor.de@21:1/5 to axtens on Wed May 25 02:40:05 2022
    axtens schrieb am Mittwoch, 25. Mai 2022 um 11:22:44 UTC+2:
    On Wednesday, 25 May 2022 at 4:19:45 pm UTC+8, minf...@arcor.de wrote:
    IMO the Forth core wordset and its associated test programs tester.fr and core.fr
    should run on any Forth system. It is the "agreed" bare minimum.
    What I was after originally was not a "test suite" but a "unit test library". I'm not really interested in establishing whether the Forth is compliant with a Forth standard. I'm more interested in working within the pedagogical framework of Exercism.

    Sorry, I was not after compliance but after "unit testing".
    So tester.fr provides Forth code for assertions in the form of
    T{ ... -> ... }T

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From axtens@21:1/5 to minf...@arcor.de on Wed May 25 02:22:43 2022
    On Wednesday, 25 May 2022 at 4:19:45 pm UTC+8, minf...@arcor.de wrote:
    IMO the Forth core wordset and its associated test programs tester.fr and core.fr
    should run on any Forth system. It is the "agreed" bare minimum.

    What I was after originally was not a "test suite" but a "unit test library". I'm not really interested in establishing whether the Forth is compliant with a Forth standard. I'm more interested in working within the pedagogical framework of Exercism.

    Bear in mind that more complete Forths are practically always full of
    very individual (application domain specific) language extensions.

    No disagreement there.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From axtens@21:1/5 to minf...@arcor.de on Wed May 25 02:48:28 2022
    On Wednesday, 25 May 2022 at 5:40:07 pm UTC+8, minf...@arcor.de wrote:
    Sorry, I was not after compliance but after "unit testing".
    So tester.fr provides Forth code for assertions in the form of
    T{ ... -> ... }T
    My apologies. Okay, that's very interesting. I shall look into it further.

    Thank you.
    --Bruce

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From axtens@21:1/5 to axtens on Wed May 25 03:09:02 2022
    On Wednesday, 25 May 2022 at 5:48:29 pm UTC+8, axtens wrote:
    On Wednesday, 25 May 2022 at 5:40:07 pm UTC+8, minf...@arcor.de wrote:
    Sorry, I was not after compliance but after "unit testing".
    So tester.fr provides Forth code for assertions in the form of
    T{ ... -> ... }T
    My apologies. Okay, that's very interesting. I shall look into it further.

    And an example of its use in the documentation on question-dupe at http://lars.nocrew.org/forth2012/core/qDUP.html

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Gerry Jackson@21:1/5 to axtens on Thu May 26 07:36:02 2022
    On 25/05/2022 11:09, axtens wrote:
    On Wednesday, 25 May 2022 at 5:48:29 pm UTC+8, axtens wrote:
    On Wednesday, 25 May 2022 at 5:40:07 pm UTC+8, minf...@arcor.de wrote:
    Sorry, I was not after compliance but after "unit testing".
    So tester.fr provides Forth code for assertions in the form of
    T{ ... -> ... }T
    My apologies. Okay, that's very interesting. I shall look into it further.

    And an example of its use in the documentation on question-dupe at http://lars.nocrew.org/forth2012/core/qDUP.html

    There are many examples of the use of T{ ... }T in the Forth 2012
    standard in the specifications for standard words. Also in Annex F Test
    Suite.
    See https://forth-standard.org/standard/testsuite

    --
    Gerry

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)