MCPcopy Create free account
hub / github.com/bdring/FluidNC / TEST

Function TEST

FluidNC/tests/ErrorBehaviorTest.cpp:5–11  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3#include "../src/Error.h"
4
5TEST(ErrorBehavior, ErrorNamesProvidesMessagesForKnownErrors) {
6 // Exercises a code path that consumes the `Error` enum for serialization.
7 auto it = ErrorNames.find(Error::InvalidStatement);
8 ASSERT_NE(it, ErrorNames.end());
9 ASSERT_NE(it->second, nullptr);
10 EXPECT_NE(std::string_view(it->second).find("Invalid"), std::string_view::npos);
11}
12
13TEST(ErrorBehavior, ErrorNamesLookupFailsForUnknownError) {
14 // Observable behavior: unknown entries are not present.

Callers

nothing calls this directly

Calls 2

findMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected