test_op_construct.cpp 732 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
10
#include <migraphx/migraphx.h>
#include <migraphx/migraphx.hpp>
#include "test.hpp"

TEST_CASE(add_op)
{
    auto add_op = migraphx::operation("add");
    EXPECT(add_op.name() == "add");
}

11
TEST_CASE(reduce_mean_without_quotes)
12
13
14
15
16
{
    auto rm = migraphx::operation("reduce_mean", "{axes : [1, 2, 3, 4]}");
    EXPECT(rm.name() == "reduce_mean");
}

17
TEST_CASE(reduce_mean)
18
19
20
21
22
{
    auto rm = migraphx::operation("reduce_mean", "{\"axes\" : [1, 2, 3, 4]}");
    EXPECT(rm.name() == "reduce_mean");
}

23
24
25
26
27
28
TEST_CASE(reduce_mean_with_format)
{
    auto rm = migraphx::operation("reduce_mean", "{axes : [%i, %i, %i, %i]}", 1, 2, 3, 4);
    EXPECT(rm.name() == "reduce_mean");
}

29
int main(int argc, const char* argv[]) { test::run(argc, argv); }