| 44 | } |
| 45 | |
| 46 | TEST_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 | |
| 78 | int main(int argc, const char* argv[]) { test::run(argc, argv); } |
nothing calls this directly
no test coverage detected