MCPcopy Create free account
hub / github.com/CppCXY/EmmyLuaCodeStyle / TEST

Function TEST

Test/src/Grammar_unitest.cpp:15–28  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

13}
14
15TEST(LuaGrammar, basic) {
16 std::vector<std::string> paths;
17 std::filesystem::path root(TestHelper::ScriptBase);
18 std::filesystem::path dir = root / "grammar";
19 TestHelper::CollectLuaFile(dir, paths, root);
20 for (auto &filePath: paths) {
21 auto text = TestHelper::ReadFile(filePath);
22 auto p = TestHelper::GetParser(text);
23
24 EXPECT_FALSE(p.HasError())
25 << util::format("error at {}\n", filePath)
26 << MakeErrors(p);
27 }
28}
29
30TEST(LuaGrammar, extend) {
31 EXPECT_FALSE(TestHelper::GetParser("local t = `123`", true).HasError()) << "extend grammar Interpolate strings test fail";

Callers 1

Calls 4

ReadFileFunction · 0.85
MakeErrorsFunction · 0.85
formatFunction · 0.50
HasErrorMethod · 0.45

Tested by

no test coverage detected