MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / TEST

Function TEST

tensorflow/compiler/xla/util_test.cc:31–38  ·  view source on GitHub ↗

Verifies that, even with a different number of leading spaces, the Reindent routine turns them into a uniform number of leading spaces. Also throws in some trailing whitespace on the original to show it is removed.

Source from the content-addressed store, hash-verified

29// Also throws in some trailing whitespace on the original to show it is
30// removed.
31TEST(UtilTest, ReindentsDifferentNumberOfLeadingSpacesUniformly) {
32 string original = R"( hello there
33 world)";
34 string got = Reindent(original, " ");
35 string want = R"( hello there
36 world)";
37 EXPECT_EQ(want, got);
38}
39
40TEST(UtilTest, HumanReadableNumFlopsExample) {
41 ASSERT_EQ("1.00GFLOP/s", HumanReadableNumFlops(1e9, 1e9));

Callers

nothing calls this directly

Calls 7

ReindentFunction · 0.85
HumanReadableNumFlopsFunction · 0.85
CommaSeparatedStringFunction · 0.85
VectorStringFunction · 0.85
LogLinesFunction · 0.85
CommonFactorsFunction · 0.85
SanitizeFileNameFunction · 0.85

Tested by

no test coverage detected