@@ -38,37 +38,45 @@ TEST_F(ScopedHashTableTest, AccessWithNoActiveScope) {
38
38
}
39
39
40
40
TEST_F (ScopedHashTableTest, AccessWithAScope) {
41
- [[maybe_unused]] ScopedHashTableScope varScope (symbolTable);
41
+ [[maybe_unused]] ScopedHashTableScope<StringRef, StringRef> varScope (
42
+ symbolTable);
42
43
EXPECT_EQ (symbolTable.count (kGlobalName ), 1U );
43
44
}
44
45
45
46
TEST_F (ScopedHashTableTest, InsertInScope) {
46
- [[maybe_unused]] ScopedHashTableScope varScope (symbolTable);
47
+ [[maybe_unused]] ScopedHashTableScope<StringRef, StringRef> varScope (
48
+ symbolTable);
47
49
symbolTable.insert (kLocalName , kLocalValue );
48
50
EXPECT_EQ (symbolTable.count (kLocalName ), 1U );
49
51
}
50
52
51
53
TEST_F (ScopedHashTableTest, InsertInLinearSortedScope) {
52
- [[maybe_unused]] ScopedHashTableScope varScope (symbolTable);
53
- [[maybe_unused]] ScopedHashTableScope varScope2 (symbolTable);
54
- [[maybe_unused]] ScopedHashTableScope varScope3 (symbolTable);
54
+ [[maybe_unused]] ScopedHashTableScope<StringRef, StringRef> varScope (
55
+ symbolTable);
56
+ [[maybe_unused]] ScopedHashTableScope<StringRef, StringRef> varScope2 (
57
+ symbolTable);
58
+ [[maybe_unused]] ScopedHashTableScope<StringRef, StringRef> varScope3 (
59
+ symbolTable);
55
60
symbolTable.insert (kLocalName , kLocalValue );
56
61
EXPECT_EQ (symbolTable.count (kLocalName ), 1U );
57
62
}
58
63
59
64
TEST_F (ScopedHashTableTest, InsertInOutedScope) {
60
65
{
61
- [[maybe_unused]] ScopedHashTableScope varScope (symbolTable);
66
+ [[maybe_unused]] ScopedHashTableScope<StringRef, StringRef> varScope (
67
+ symbolTable);
62
68
symbolTable.insert (kLocalName , kLocalValue );
63
69
}
64
70
EXPECT_EQ (symbolTable.count (kLocalName ), 0U );
65
71
}
66
72
67
73
TEST_F (ScopedHashTableTest, OverrideInScope) {
68
- [[maybe_unused]] ScopedHashTableScope funScope (symbolTable);
74
+ [[maybe_unused]] ScopedHashTableScope<StringRef, StringRef> funScope (
75
+ symbolTable);
69
76
symbolTable.insert (kLocalName , kLocalValue );
70
77
{
71
- [[maybe_unused]] ScopedHashTableScope varScope (symbolTable);
78
+ [[maybe_unused]] ScopedHashTableScope<StringRef, StringRef> varScope (
79
+ symbolTable);
72
80
symbolTable.insert (kLocalName , kLocalValue2 );
73
81
EXPECT_EQ (symbolTable.lookup (kLocalName ), kLocalValue2 );
74
82
}
@@ -78,11 +86,11 @@ TEST_F(ScopedHashTableTest, OverrideInScope) {
78
86
TEST_F (ScopedHashTableTest, GetCurScope) {
79
87
EXPECT_EQ (symbolTable.getCurScope (), &globalScope);
80
88
{
81
- ScopedHashTableScope funScope (symbolTable);
82
- ScopedHashTableScope funScope2 (symbolTable);
89
+ ScopedHashTableScope<StringRef, StringRef> funScope (symbolTable);
90
+ ScopedHashTableScope<StringRef, StringRef> funScope2 (symbolTable);
83
91
EXPECT_EQ (symbolTable.getCurScope (), &funScope2);
84
92
{
85
- ScopedHashTableScope blockScope (symbolTable);
93
+ ScopedHashTableScope<StringRef, StringRef> blockScope (symbolTable);
86
94
EXPECT_EQ (symbolTable.getCurScope (), &blockScope);
87
95
}
88
96
EXPECT_EQ (symbolTable.getCurScope (), &funScope2);
0 commit comments