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

Unified Diff: mojom/mojom_parser/parser/resolution_test.go

Issue 1767033002: Mojom parser: Compute and validate struct field ordinals. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Maintain the property that the fields of a module.Struct are sorted in declaration order. Created 4 years, 9 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
« no previous file with comments | « mojom/mojom_parser/parser/parsing.go ('k') | mojom/mojom_parser/serialization/serialization.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojom/mojom_parser/parser/resolution_test.go
diff --git a/mojom/mojom_parser/parser/resolution_test.go b/mojom/mojom_parser/parser/resolution_test.go
index 789374b00bd07f87e267848df54ac836da95229a..8bd732371b3f9798875ce6f48e9fd665e3629499 100644
--- a/mojom/mojom_parser/parser/resolution_test.go
+++ b/mojom/mojom_parser/parser/resolution_test.go
@@ -1045,7 +1045,7 @@ func TestSingleFileResolutionSuccess(t *testing.T) {
testFunc := func(descriptor *mojom.MojomDescriptor) error {
myStructType := descriptor.TypesByKey["TYPE_KEY:MyStruct"].(*mojom.MojomStruct)
- aColorField := myStructType.Fields[0]
+ aColorField := myStructType.FieldsInLexicalOrder[0]
concreteValue := aColorField.DefaultValue.ResolvedConcreteValue().(*mojom.EnumValue)
key := concreteValue.ValueKey()
if key != "TYPE_KEY:Color.BLUE" {
« no previous file with comments | « mojom/mojom_parser/parser/parsing.go ('k') | mojom/mojom_parser/serialization/serialization.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698