Skip to content

Commit

Permalink
Refactor infix processing in main test file
Browse files Browse the repository at this point in the history
Added a preprocessing step for infix expressions to ensure consistent formatting before further processing. This change includes an assertion to validate the preprocessing output.
  • Loading branch information
matthew-mccall committed Jul 24, 2024
1 parent be62b69 commit a2ea351
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion extras/tests/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@

int main(const int argc, char* argv[])
{
struct Oa_Expression* result = Oa_FromInFix("2 + 2");
const char* preprocessed = Oa_PreProcessInFix("2+2");
munit_assert_string_equal(preprocessed, "2 + 2");

struct Oa_Expression* result = Oa_FromInFix(preprocessed);
munit_assert_not_null(result);

const char* expected =
Expand Down

0 comments on commit a2ea351

Please sign in to comment.