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

Function TEST_CASE

test/ref/unique.cpp:79–99  ·  view source on GitHub ↗

sorted. single entry

Source from the content-addressed store, hash-verified

77
78// sorted. single entry
79TEST_CASE(unique_sorted_single_entry_test)
80{
81 std::vector<int> data = {2};
82 int64_t axis = 0;
83 int64_t sorted = 1;
84 std::vector<size_t> lens = {1};
85 migraphx::shape data_shape{migraphx::shape::int32_type, lens};
86 const auto& [y, idx, x_rev, ct] = run_program(data, data_shape, sorted, axis);
87
88 std::vector<int> gold_val = {2};
89 EXPECT(y == gold_val);
90
91 std::vector<int64_t> gold_y_idx = {0};
92 EXPECT(idx == gold_y_idx);
93
94 std::vector<int64_t> gold_x_rev = {0};
95 EXPECT(x_rev == gold_x_rev);
96
97 std::vector<int64_t> gold_ct = {1};
98 EXPECT(ct == gold_ct);
99}
100
101// unsorted. single entry
102TEST_CASE(unique_unsorted_single_entry_test)

Callers

nothing calls this directly

Calls 1

run_programFunction · 0.70

Tested by

no test coverage detected