MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / TEST

Function TEST

tensorflow/compiler/jit/graphcycles/ordered_set_test.cc:25–43  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

23namespace tensorflow {
24namespace {
25TEST(OrderedSetTest, Insert) {
26 OrderedSet<int> ordered_set;
27 EXPECT_TRUE(ordered_set.Insert(90));
28 EXPECT_TRUE(ordered_set.Insert(100));
29 EXPECT_TRUE(ordered_set.Insert(80));
30
31 EXPECT_FALSE(ordered_set.Insert(100));
32
33 EXPECT_EQ(ordered_set.Size(), 3);
34
35 EXPECT_TRUE(ordered_set.Contains(90));
36 EXPECT_TRUE(ordered_set.Contains(100));
37 EXPECT_TRUE(ordered_set.Contains(80));
38
39 EXPECT_FALSE(ordered_set.Contains(40));
40
41 std::array<int, 3> expected_sequence = {90, 100, 80};
42 EXPECT_EQ(ordered_set.GetSequence(), expected_sequence);
43}
44
45TEST(OrderedSetTest, Erase) {
46 OrderedSet<int> ordered_set;

Callers

nothing calls this directly

Calls 6

GetSequenceMethod · 0.80
InsertMethod · 0.45
SizeMethod · 0.45
ContainsMethod · 0.45
EraseMethod · 0.45
ClearMethod · 0.45

Tested by

no test coverage detected