MCPcopy Create free account
hub / github.com/ROCm/AMDMIGraphX / TEST_CASE

Function TEST_CASE

test/print_graph_test.cpp:46–76  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

44}
45
46TEST_CASE(basic_graph_test)
47{
48 migraphx::program p = create_program();
49
50 std::stringstream ss;
51 p.print_graph(ss);
52 std::string test = ss.str();
53 std::cout << "test = " << test << std::endl;
54
55 EXPECT(migraphx::contains(test, "digraph"));
56 EXPECT(migraphx::contains(test, "peripheries=0"));
57 EXPECT(migraphx::contains(
58 test,
59 R"("@0"[label=<<TABLE BORDER="0" CELLBORDER="0" CELLPADDING="0" CELLSPACING="0" COLOR="transparent"><TR ALIGN="center"><TD><B>@literal</B></TD></TR></TABLE>> style="filled" fillcolor="#ADD8E6" fontcolor="#000000" color="" shape=rectangle fontname=Helvetica];)"));
60 EXPECT(migraphx::contains(
61 test,
62 R"("y"[label=<<TABLE BORDER="0" CELLBORDER="0" CELLPADDING="0" CELLSPACING="0" COLOR="transparent"><TR ALIGN="center"><TD><B>@param</B></TD></TR><TR ALIGN="center"><TD>int64_type<BR/>{1}, {0}</TD></TR></TABLE>> style="filled" fillcolor="#F0E68C" fontcolor="#000000" color="" shape=rectangle fontname=Helvectica];)"));
63 EXPECT(migraphx::contains(
64 test,
65 R"("x"[label=<<TABLE BORDER="0" CELLBORDER="0" CELLPADDING="0" CELLSPACING="0" COLOR="transparent"><TR ALIGN="center"><TD><B>@param</B></TD></TR><TR ALIGN="center"><TD>int64_type<BR/>{1}, {0}</TD></TR></TABLE>> style="filled" fillcolor="#F0E68C" fontcolor="#000000" color="" shape=rectangle fontname=Helvectica];)"));
66 EXPECT(migraphx::contains(
67 test,
68 R"("@3"[label=<<TABLE BORDER="0" CELLBORDER="0" CELLPADDING="4" CELLSPACING="0" COLOR="transparent"><TR ALIGN="center"><TD><B>sum</B></TD></TR></TABLE>> style="rounded,filled" fillcolor="#D3D3D3" fontcolor="#000000" color="" shape=none fontname=Helvetica];)"));
69 EXPECT(migraphx::contains(test, R"("x" -> "@3"[label="int64_type\n{1}, {0}"];)"));
70 EXPECT(migraphx::contains(test, R"("y" -> "@3"[label="int64_type\n{1}, {0}"];)"));
71 EXPECT(migraphx::contains(
72 test,
73 R"("@4"[label=<<TABLE BORDER="0" CELLBORDER="0" CELLPADDING="4" CELLSPACING="0" COLOR="transparent"><TR ALIGN="center"><TD><B>sum</B></TD></TR></TABLE>> style="rounded,filled" fillcolor="#D3D3D3" fontcolor="#000000" color="" shape=none fontname=Helvetica];)"));
74 EXPECT(migraphx::contains(test, R"("@3" -> "@4"[label="int64_type\n{1}, {0}"];)"));
75 EXPECT(migraphx::contains(test, R"("@0" -> "@4"[label="int64_type\n{1}, {0}"];)"));
76}
77
78int main(int argc, const char* argv[]) { test::run(argc, argv); }

Callers

nothing calls this directly

Calls 4

containsFunction · 0.85
create_programFunction · 0.70
print_graphMethod · 0.45
strMethod · 0.45

Tested by

no test coverage detected