Skip to content

Commit

Permalink
chore(test): update unit tests for latest bug fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
wravery committed Sep 7, 2024
1 parent 6fd05b9 commit b07ebd4
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion test/PegtlExecutableTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -233,10 +233,25 @@ TEST(PegtlExecutableCase, ParserDepthLimitExceeded)

TEST(PegtlExecutableCase, ParseFloatWithFractionalAndExponentialParts)
{
memory_input<> input(R"gql({ field(value: 1.1e1) })gql",
memory_input<> input(R"gql(
query {
combinedField(value: 1.1e1)
onlyFractional(value: 1.1)
onlyExponent(value: 1e1)
})gql",
"ParseFloatWithFractionalAndExponentialParts");

const bool result = parse<executable_document>(input);

ASSERT_TRUE(result) << "we should be able to parse the doc";
}

TEST(PegtlExecutableCase, ParseIgnoreUnicodeBOM)
{
memory_input<> input("query { \xEF\xBB\xBF __typename }",
"ParseIgnoreUnicodeBOM");

const bool result = parse<executable_document>(input);

ASSERT_TRUE(result) << "we should be able to parse the doc";
}

0 comments on commit b07ebd4

Please sign in to comment.