MCPcopy Create free account
hub / github.com/apache/tvm-ffi / TEST

Function TEST

tests/cpp/extra/test_dataclass.cc:43–69  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

41// ---------------------------------------------------------------------------
42
43TEST(OstreamAny, Primitives) {
44 {
45 std::ostringstream os;
46 os << Any(int64_t{42});
47 EXPECT_EQ(os.str(), "42");
48 }
49 {
50 std::ostringstream os;
51 os << Any(3.14);
52 EXPECT_EQ(os.str(), "3.14");
53 }
54 {
55 std::ostringstream os;
56 os << Any(true);
57 EXPECT_EQ(os.str(), "True");
58 }
59 {
60 std::ostringstream os;
61 os << Any(nullptr);
62 EXPECT_EQ(os.str(), "None");
63 }
64 {
65 std::ostringstream os;
66 os << Any(String("hello"));
67 EXPECT_EQ(os.str(), "\"hello\"");
68 }
69}
70
71TEST(OstreamAny, ObjectRef) {
72 std::ostringstream os;

Callers

nothing calls this directly

Calls 3

AnyClass · 0.50
StringClass · 0.50
TIntClass · 0.50

Tested by

no test coverage detected