Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit

Permalink
Remove unknown proto2 enum values (#363)
Browse files Browse the repository at this point in the history
Signed-off-by: Justin King <jcking@google.com>
  • Loading branch information
jcking authored Jun 27, 2024
1 parent 7c230a8 commit 6b5ebe7
Showing 1 changed file with 0 additions and 230 deletions.
230 changes: 0 additions & 230 deletions tests/simple/testdata/enums.textproto
Original file line number Diff line number Diff line change
Expand Up @@ -51,78 +51,6 @@ section {
expr: "TestAllTypes{}.standalone_enum"
value { int64_value: 0 }
}
test {
name: "select"
container: "google.api.expr.test.v1.proto2"
expr: "x.standalone_enum"
type_env {
name: "x"
ident {
type { message_type: "google.api.expr.test.v1.proto2.TestAllTypes" }
}
}
bindings {
key: "x"
value {
value {
object_value {
[type.googleapis.com/google.api.expr.test.v1.proto2.TestAllTypes] {
standalone_enum: 2
}
}
}
}
}
value { int64_value: 2 }
}
test {
name: "select_big"
container: "google.api.expr.test.v1.proto2"
expr: "x.standalone_enum"
type_env {
name: "x"
ident {
type { message_type: "google.api.expr.test.v1.proto2.TestAllTypes" }
}
}
bindings {
key: "x"
value {
value {
object_value {
[type.googleapis.com/google.api.expr.test.v1.proto2.TestAllTypes] {
standalone_enum: 108
}
}
}
}
}
value { int64_value: 108 }
}
test {
name: "select_neg"
container: "google.api.expr.test.v1.proto2"
expr: "x.standalone_enum"
type_env {
name: "x"
ident {
type { message_type: "google.api.expr.test.v1.proto2.TestAllTypes" }
}
}
bindings {
key: "x"
value {
value {
object_value {
[type.googleapis.com/google.api.expr.test.v1.proto2.TestAllTypes] {
standalone_enum: -3
}
}
}
}
}
value { int64_value: -3 }
}
test {
name: "field_type"
container: "google.api.expr.test.v1.proto2"
Expand Down Expand Up @@ -153,30 +81,6 @@ section {
}
}
}
test {
name: "assign_standalone_int_big"
container: "google.api.expr.test.v1.proto2"
expr: "TestAllTypes{standalone_enum: 99}"
value {
object_value {
[type.googleapis.com/google.api.expr.test.v1.proto2.TestAllTypes] {
standalone_enum: 99
}
}
}
}
test {
name: "assign_standalone_int_neg"
container: "google.api.expr.test.v1.proto2"
expr: "TestAllTypes{standalone_enum: -1}"
value {
object_value {
[type.googleapis.com/google.api.expr.test.v1.proto2.TestAllTypes] {
standalone_enum: -1
}
}
}
}
test {
name: "assign_standalone_int_too_big"
container: "google.api.expr.test.v1.proto2"
Expand Down Expand Up @@ -469,93 +373,6 @@ section {
}
}
}
test {
name: "select"
container: "google.api.expr.test.v1.proto2"
expr: "x.standalone_enum"
type_env {
name: "x"
ident {
type { message_type: "google.api.expr.test.v1.proto2.TestAllTypes" }
}
}
bindings {
key: "x"
value {
value {
object_value {
[type.googleapis.com/google.api.expr.test.v1.proto2.TestAllTypes] {
standalone_enum: 2
}
}
}
}
}
value {
enum_value {
type: "google.api.expr.test.v1.proto2.TestAllTypes.NestedEnum"
value: 2
}
}
}
test {
name: "select_big"
container: "google.api.expr.test.v1.proto2"
expr: "x.standalone_enum"
type_env {
name: "x"
ident {
type { message_type: "google.api.expr.test.v1.proto2.TestAllTypes" }
}
}
bindings {
key: "x"
value {
value {
object_value {
[type.googleapis.com/google.api.expr.test.v1.proto2.TestAllTypes] {
standalone_enum: 108
}
}
}
}
}
value {
enum_value {
type: "google.api.expr.test.v1.proto2.TestAllTypes.NestedEnum"
value: 108
}
}
}
test {
name: "select_neg"
container: "google.api.expr.test.v1.proto2"
expr: "x.standalone_enum"
type_env {
name: "x"
ident {
type { message_type: "google.api.expr.test.v1.proto2.TestAllTypes" }
}
}
bindings {
key: "x"
value {
value {
object_value {
[type.googleapis.com/google.api.expr.test.v1.proto2.TestAllTypes] {
standalone_enum: -3
}
}
}
}
}
value {
enum_value {
type: "google.api.expr.test.v1.proto2.TestAllTypes.NestedEnum"
value: -3
}
}
}
test {
name: "field_type"
container: "google.api.expr.test.v1.proto2"
Expand Down Expand Up @@ -588,30 +405,6 @@ section {
}
}
}
test {
name: "assign_standalone_int_big"
container: "google.api.expr.test.v1.proto2"
expr: "TestAllTypes{standalone_enum: TestAllTypes.NestedEnum(99)}"
value {
object_value {
[type.googleapis.com/google.api.expr.test.v1.proto2.TestAllTypes] {
standalone_enum: 99
}
}
}
}
test {
name: "assign_standalone_int_neg"
container: "google.api.expr.test.v1.proto2"
expr: "TestAllTypes{standalone_enum: TestAllTypes.NestedEnum(-1)}"
value {
object_value {
[type.googleapis.com/google.api.expr.test.v1.proto2.TestAllTypes] {
standalone_enum: -1
}
}
}
}
test {
name: "convert_symbol_to_int"
container: "google.api.expr.test.v1.proto2"
Expand All @@ -636,29 +429,6 @@ section {
}
value { int64_value: 444 }
}
test {
name: "convert_unnamed_to_int_select"
expr: "int(x.standalone_enum)"
type_env {
name: "x"
ident {
type { message_type: "google.api.expr.test.v1.proto2.TestAllTypes" }
}
}
bindings {
key: "x"
value {
value {
object_value {
[type.googleapis.com/google.api.expr.test.v1.proto2.TestAllTypes] {
standalone_enum: -987
}
}
}
}
}
value { int64_value: -987 }
}
test {
name: "convert_int_inrange"
container: "google.api.expr.test.v1.proto2"
Expand Down

0 comments on commit 6b5ebe7

Please sign in to comment.