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

Side by Side Diff: mojom/mojom_parser/parser/resolution_test.go

Issue 1690453002: Mojom Parser: Populate |serialized_runimte_type_info| field during serialization. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Rename variables and new sha1s. Created 4 years, 10 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 package parser 5 package parser
6 6
7 import ( 7 import (
8 "fmt" 8 "fmt"
9 "mojom/mojom_parser/mojom" 9 "mojom/mojom_parser/mojom"
10 "strings" 10 "strings"
(...skipping 1227 matching lines...) Expand 10 before | Expand all | Expand 10 after
1238 struct Struct2{}; 1238 struct Struct2{};
1239 1239
1240 interface Interface1 { 1240 interface Interface1 {
1241 const Color FAVORITE_COLOR = RED; 1241 const Color FAVORITE_COLOR = RED;
1242 1242
1243 Foo(int32 x) => (string y); 1243 Foo(int32 x) => (string y);
1244 }; 1244 };
1245 1245
1246 interface Interface2 { 1246 interface Interface2 {
1247 Foo(int32 x) => (Struct1 y); 1247 Foo(int32 x) => (Struct1 y);
1248 Bar(string x);
1248 }; 1249 };
1249 ` 1250 `
1250 1251
1251 test.addTestCase(contents, 1252 test.addTestCase(contents,
1252 "Interface1", 1253 "Interface1",
1253 []string{"Interface1", "Color"}, 1254 []string{"Interface1", "Color"},
1254 ) 1255 )
1255 1256
1256 test.addTestCase(contents, 1257 test.addTestCase(contents,
1257 "Interface2", 1258 "Interface2",
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
1385 typeKey = mojom.ComputeTypeKey(t) 1386 typeKey = mojom.ComputeTypeKey(t)
1386 } 1387 }
1387 userDefinedType := descriptor.TypesByKey[typeKey] 1388 userDefinedType := descriptor.TypesByKey[typeKey]
1388 if userDefinedType == nil { 1389 if userDefinedType == nil {
1389 panic(fmt.Sprintf("No type found for: %s", t)) 1390 panic(fmt.Sprintf("No type found for: %s", t))
1390 } 1391 }
1391 typeSet.Add(userDefinedType) 1392 typeSet.Add(userDefinedType)
1392 } 1393 }
1393 return typeSet 1394 return typeSet
1394 } 1395 }
OLDNEW
« no previous file with comments | « mojom/mojom_parser/mojom/user_defined_types.go ('k') | mojom/mojom_parser/serialization/serialization.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698