yhirose / cpp-peglib

A single file C++ header-only PEG (Parsing Expression Grammars) library
MIT License
880 stars 112 forks source link

Provided unit tests fail #225

Closed NotAPenguin0 closed 2 years ago

NotAPenguin0 commented 2 years ago

Cloning a fresh copy of the repository and running the tests fails 32 out of 157 tests, is this intentional? If not, they should probably be fixed as it's hard to see for contributors if they have broken anything. Failed tests are listed below.

[  FAILED  ] UserRuleTest.User_defined_rule_test
[  FAILED  ] PredicateTest.Semantic_predicate_test
[  FAILED  ] UnicodeTest.Japanese_character
[  FAILED  ] UnicodeTest.dot_with_a_code
[  FAILED  ] UnicodeTest.dot_with_a_char
[  FAILED  ] UnicodeTest.character_class
[  FAILED  ] MacroTest.Macro_simple_test
[  FAILED  ] MacroTest.Macro_two_parameters
[  FAILED  ] MacroTest.Macro_syntax_error
[  FAILED  ] MacroTest.Macro_missing_argument
[  FAILED  ] MacroTest.Macro_reference_syntax_error
[  FAILED  ] MacroTest.Macro_invalid_macro_reference_error
[  FAILED  ] MacroTest.Macro_calculator
[  FAILED  ] MacroTest.Macro_expression_arguments
[  FAILED  ] MacroTest.Macro_recursive
[  FAILED  ] MacroTest.Macro_recursive2
[  FAILED  ] MacroTest.Macro_exclusive_modifiers
[  FAILED  ] MacroTest.Macro_token_check_test
[  FAILED  ] MacroTest.Macro_passes_an_arg_to_another_macro
[  FAILED  ] MacroTest.Unreferenced_rule
[  FAILED  ] MacroTest.Nested_macro_call
[  FAILED  ] MacroTest.Nested_macro_call2
[  FAILED  ] LineInformationTest.Line_information_test
[  FAILED  ] DicTest.Dictionary
[  FAILED  ] DicTest.Dictionary_invalid
[  FAILED  ] ErrorTest.Default_error_handling_1
[  FAILED  ] ErrorTest.Default_error_handling_2
[  FAILED  ] ErrorTest.Default_error_handling_fiblang
[  FAILED  ] ErrorTest.Error_recovery_1
[  FAILED  ] ErrorTest.Error_recovery_2
[  FAILED  ] ErrorTest.Error_recovery_3
[  FAILED  ] ErrorTest.Error_recovery_Java
yhirose commented 2 years ago

@NotAPenguin0, thank you for the feedback, but I don't have any problem on my machine and the GitHub Actions workflow also works fine.

https://github.com/yhirose/cpp-peglib/actions

Here are the steps to build and run the unit test:

mkdir build
cd build
cmake ..
make
ctest

Hope it helps!