Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1280)

Unified Diff: mojo/go/tests/validation_type_test.go

Issue 1958463003: Mojom compiler: Eliminate duplicate representation of enum values in mojom_files.mojom. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Responded to code reveiw comments. Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: mojo/go/tests/validation_type_test.go
diff --git a/mojo/go/tests/validation_type_test.go b/mojo/go/tests/validation_type_test.go
index bb2ba6f16e39e924e4d32af28737c76107936715..d95cff42d1857a571794f72860d64d1dfbf0a1f1 100644
--- a/mojo/go/tests/validation_type_test.go
+++ b/mojo/go/tests/validation_type_test.go
@@ -71,22 +71,6 @@ func TestEnumType(t *testing.T) {
if _, ok := labelMap[*label.DeclData.ShortName]; !ok {
t.Fatalf("Declaration Data's ShortName for BasicEnum's label %s is unknown ", *label.DeclData.ShortName)
}
- // label's EnumTypeKey must be correct.
- if label.EnumTypeKey == "" {
- t.Fatalf("EnumTypeKey for BasicEnum's label %s was empty.", *label.DeclData.ShortName)
- }
- userDefinedType := test.GetAllMojomTypeDefinitions()[label.EnumTypeKey]
- if userDefinedType == nil {
- t.Fatalf("EnumTypeKey for BasicEnum's label %s was invalid:.", *label.DeclData.ShortName, label.EnumTypeKey)
- }
- enumType, ok := userDefinedType.(*mojom_types.UserDefinedTypeEnumType)
- if !ok {
- t.Fatalf("UserDefinedType for the EnumTypeKey for BasicEnum's label %s was not a EnumType", *label.DeclData.ShortName)
- }
- if *enumType.Value.DeclData.FullIdentifier != fullIdentifier {
- t.Fatalf("EnumTypeKey for BasicEnum's label %s was %s.", *label.DeclData.ShortName, label.EnumTypeKey)
- }
-
// Check that the label's IntValue matches the expected one.
if expectedOrdinal := labelMap[*label.DeclData.ShortName]; label.IntValue != expectedOrdinal {
t.Fatalf("IntValue for Enum BasicEnum's label %s was %d but expected %d",
« no previous file with comments | « mojo/dart/unittests/embedder_tests/bindings_generation_test.dart ('k') | mojo/public/interfaces/bindings/mojom_files.mojom » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698