1# Copyright 2013 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 5import sys 6 7import test_support 8 9EXPECT_EQ = test_support.EXPECT_EQ 10EXPECT_TRUE = test_support.EXPECT_TRUE 11RunTest = test_support.RunTest 12ModulesAreEqual = test_support.ModulesAreEqual 13BuildTestModule = test_support.BuildTestModule 14TestTestModule = test_support.TestTestModule 15 16 17def BuildAndTestModule(): 18 return TestTestModule(BuildTestModule()) 19 20 21def TestModulesEqual(): 22 return EXPECT_TRUE(ModulesAreEqual(BuildTestModule(), BuildTestModule())) 23 24 25def Main(args): 26 errors = 0 27 errors += RunTest(BuildAndTestModule) 28 errors += RunTest(TestModulesEqual) 29 30 return errors 31 32 33if __name__ == '__main__': 34 sys.exit(Main(sys.argv[1:])) 35