SWI-Prolog - Unit testing library plunit - How is forall option used?
问题 For my lexer (tokenizer) all of the ASCII 7-bit characters (0x00 to 0x7F) have a specific token. As SWI-Prolog supports Unicode, the character codes go from 0x0000 to 0xFFFF. In my lexer, since there are many characters that will not map to a specific token there is an unknown token (tokUnknown). To ensure that all of the characters with code between 0 and 127 (0x00 to 0x7F) do not have tokUnknown , test cases are needed. The test case needs a simple lexer to convert the character to a token.