OLD | NEW |
(Empty) | |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 package tests |
| 6 |
| 7 import ( |
| 8 "mojo/public/interfaces/bindings/tests/test_enums" |
| 9 "testing" |
| 10 ) |
| 11 |
| 12 func TestEnums(t *testing.T) { |
| 13 if test_enums.TestEnum_Foo != IdentityEnum1(test_enums.TestEnum_Foo) { |
| 14 t.Errorf("IdentityEnum1 failure.") |
| 15 } |
| 16 |
| 17 if test_enums.TestEnum2_Foo != IdentityEnum2(test_enums.TestEnum2_Foo) { |
| 18 t.Errorf("IdentityEnum1 failure.") |
| 19 } |
| 20 } |
| 21 |
| 22 func IdentityEnum1(x test_enums.TestEnum) test_enums.TestEnum { |
| 23 return x |
| 24 } |
| 25 |
| 26 func IdentityEnum2(x test_enums.TestEnum2) test_enums.TestEnum2 { |
| 27 return x |
| 28 } |
OLD | NEW |