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

Side by Side Diff: mojo/public/tools/bindings/pylib/mojom_tests/parse/translate_unittest.py

Issue 844433003: Revert "Generate some of the C++ bindings for mojom tagged unions." (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 11 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
« no previous file with comments | « mojo/public/tools/bindings/pylib/mojom_tests/generate/generator_unittest.py ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2014 The Chromium Authors. All rights reserved. 1 # Copyright 2014 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 import imp 5 import imp
6 import os.path 6 import os.path
7 import sys 7 import sys
8 import unittest 8 import unittest
9 9
10 def _GetDirAbove(dirname): 10 def _GetDirAbove(dirname):
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 ast.ImportList(), 51 ast.ImportList(),
52 [ast.Union("SomeUnion", ast.UnionBody( 52 [ast.Union("SomeUnion", ast.UnionBody(
53 [ast.UnionField("a", None, "int32"), 53 [ast.UnionField("a", None, "int32"),
54 ast.UnionField("b", None, "string")]))]) 54 ast.UnionField("b", None, "string")]))])
55 expected = [{ 55 expected = [{
56 "name": "SomeUnion", 56 "name": "SomeUnion",
57 "fields": [ 57 "fields": [
58 {"kind": "i32", "name": "a", "ordinal": None}, 58 {"kind": "i32", "name": "a", "ordinal": None},
59 {"kind": "s", "name": "b", "ordinal": None}]}] 59 {"kind": "s", "name": "b", "ordinal": None}]}]
60 actual = translate.Translate(tree, "mojom_tree") 60 actual = translate.Translate(tree, "mojom_tree")
61 self.assertEquals(actual["unions"], expected) 61 self.assertEquals(actual["union"], expected)
62 62
63 63
64 if __name__ == "__main__": 64 if __name__ == "__main__":
65 unittest.main() 65 unittest.main()
OLDNEW
« no previous file with comments | « mojo/public/tools/bindings/pylib/mojom_tests/generate/generator_unittest.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698