jeffreykegler / libmarpa

Marpa parse engine C library -- STABLE
MIT License
97 stars 11 forks source link

libMarpa tests should probably test for non-empty things #91

Closed dabrahams closed 2 years ago

dabrahams commented 2 years ago

marpa_r_terminals_expected only ever returns 0 in this test, and marpa_r_progress_report_start is only ever called when there's nothing to report (or to test for error reporting).

jeffreykegler commented 2 years ago

The "trivial" test scripts are dedicated to spotting problems in trivial parses (zero length input) and trivial grammars (grammars which only recognize zero length inputs). So this is what this test script was designed for.

Absent feedback to the contrary, I will close this issue in a few days.

dabrahams commented 2 years ago

Maybe so, but since those are the most complex tests for libMarpa, where you can easily have things like ASAN enabled, and you can see problems that would be obscured by the perl wrapper (e.g. because of the way it uses libMarpa, etc.), I would consider fleshing out the testing.

jeffreykegler commented 2 years ago

Closed for the reason given in my last comment. Where a ready opportunity exists to add tests, I will definitely do so. Some of this is being done with issue #92, where I expect to add 3 new test programs, issue92a, issue92b and issue92c.