Skip to content

Commit

Permalink
Fix map iteration expectations and trim ending whitespace (#350)
Browse files Browse the repository at this point in the history
  • Loading branch information
TristonianJones authored Apr 29, 2024
1 parent 91f3cb1 commit 4f40f4a
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion tests/simple/testdata/macros.textproto
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ section {
}
test {
name: "map_extract_keys"
expr: "{'John': 'smart', 'Paul': 'cute', 'George': 'quiet', 'Ringo': 'funny'}.map(key, key) == ['John', 'Paul', 'George', 'Ringo']"
expr: "{'John': 'smart'}.map(key, key) == ['John']"
value: { bool_value: true }
}
}
Expand Down
24 changes: 12 additions & 12 deletions tests/simple/testdata/math_ext.textproto
Original file line number Diff line number Diff line change
Expand Up @@ -985,7 +985,7 @@ section: {
value: {
int64_value: 0
}
}
}
test: {
name: "int_int_intersect"
expr: "math.bitAnd(1, 3)"
Expand All @@ -1006,7 +1006,7 @@ section: {
value: {
uint64_value: 0
}
}
}
test: {
name: "uint_uint_intersect"
expr: "math.bitAnd(1u, 3u)"
Expand All @@ -1033,21 +1033,21 @@ section: {
value: {
int64_value: 3
}
}
}
test: {
name: "int_int_positive_negative"
expr: "math.bitOr(4, -2)"
value: {
int64_value: -2
}
}
}
test: {
name: "uint_uint"
expr: "math.bitOr(1u, 4u)"
value: {
uint64_value: 5
}
}
}
test: {
name: "dyn_int_error"
expr: "math.bitOr(dyn(1.2), 1)"
Expand All @@ -1067,21 +1067,21 @@ section: {
value: {
int64_value: 2
}
}
}
test: {
name: "int_int_positive_negative"
expr: "math.bitXor(4, -2)"
value: {
int64_value: -6
}
}
}
test: {
name: "uint_uint"
expr: "math.bitXor(1u, 3u)"
value: {
uint64_value: 2
}
}
}
test: {
name: "dyn_dyn_error"
expr: "math.bitXor(dyn([]), dyn([1]))"
Expand All @@ -1101,14 +1101,14 @@ section: {
value: {
int64_value: -2
}
}
}
test: {
name: "int_negative"
expr: "math.bitNot(-1)"
value: {
int64_value: 0
}
}
}
test: {
name: "int_zero"
expr: "math.bitNot(0)"
Expand All @@ -1122,14 +1122,14 @@ section: {
value: {
uint64_value: 18446744073709551614
}
}
}
test: {
name: "uint_zero"
expr: "math.bitNot(0u)"
value: {
uint64_value: 18446744073709551615
}
}
}
test: {
name: "dyn_error"
expr: "math.bitNot(dyn(''))"
Expand Down

0 comments on commit 4f40f4a

Please sign in to comment.