Home
last modified time | relevance | path

Searched refs:unittest (Results 1 – 25 of 1331) sorted by relevance

12345678910>>...54

/external/protobuf/src/google/protobuf/
Dtest_util_lite.cc49 void TestUtilLite::SetAllFields(unittest::TestAllTypesLite* message) { in SetAllFields()
73 message->set_optional_nested_enum (unittest::TestAllTypesLite::BAZ ); in SetAllFields()
74 message->set_optional_foreign_enum(unittest::FOREIGN_LITE_BAZ ); in SetAllFields()
102 message->add_repeated_nested_enum (unittest::TestAllTypesLite::BAR ); in SetAllFields()
103 message->add_repeated_foreign_enum(unittest::FOREIGN_LITE_BAR ); in SetAllFields()
130 message->add_repeated_nested_enum (unittest::TestAllTypesLite::BAZ ); in SetAllFields()
131 message->add_repeated_foreign_enum(unittest::FOREIGN_LITE_BAZ ); in SetAllFields()
153 message->set_default_nested_enum (unittest::TestAllTypesLite::FOO ); in SetAllFields()
154 message->set_default_foreign_enum(unittest::FOREIGN_LITE_FOO ); in SetAllFields()
166 void TestUtilLite::ModifyRepeatedFields(unittest::TestAllTypesLite* message) { in ModifyRepeatedFields()
[all …]
Dextension_set_unittest.cc65 unittest::TestAllExtensions message; in TEST()
72 EXPECT_EQ(&unittest::OptionalGroup_extension::default_instance(), in TEST()
73 &message.GetExtension(unittest::optionalgroup_extension)); in TEST()
74 EXPECT_EQ(&unittest::TestAllTypes::NestedMessage::default_instance(), in TEST()
75 &message.GetExtension(unittest::optional_nested_message_extension)); in TEST()
76 EXPECT_EQ(&unittest::ForeignMessage::default_instance(), in TEST()
78 unittest::optional_foreign_message_extension)); in TEST()
80 &message.GetExtension(unittest::optional_import_message_extension)); in TEST()
86 unittest::TestAllExtensions message; in TEST()
98 unittest::TestAllExtensions message; in TEST()
[all …]
Dtest_util.cc53 void TestUtil::SetAllFields(unittest::TestAllTypes* message) { in SetAllFields()
61 void TestUtil::SetOptionalFields(unittest::TestAllTypes* message) { in SetOptionalFields()
85 message->set_optional_nested_enum (unittest::TestAllTypes::BAZ); in SetOptionalFields()
86 message->set_optional_foreign_enum(unittest::FOREIGN_BAZ ); in SetOptionalFields()
105 void TestUtil::AddRepeatedFields1(unittest::TestAllTypes* message) { in AddRepeatedFields1()
128 message->add_repeated_nested_enum (unittest::TestAllTypes::BAR); in AddRepeatedFields1()
129 message->add_repeated_foreign_enum(unittest::FOREIGN_BAR ); in AddRepeatedFields1()
144 void TestUtil::AddRepeatedFields2(unittest::TestAllTypes* message) { in AddRepeatedFields2()
168 message->add_repeated_nested_enum (unittest::TestAllTypes::BAZ); in AddRepeatedFields2()
169 message->add_repeated_foreign_enum(unittest::FOREIGN_BAZ ); in AddRepeatedFields2()
[all …]
Dtest_util.h46 namespace unittest = ::protobuf_unittest; variable
52 static void SetAllFields(unittest::TestAllTypes* message);
53 static void SetOptionalFields(unittest::TestAllTypes* message);
54 static void AddRepeatedFields1(unittest::TestAllTypes* message);
55 static void AddRepeatedFields2(unittest::TestAllTypes* message);
56 static void SetDefaultFields(unittest::TestAllTypes* message);
57 static void SetOneofFields(unittest::TestAllTypes* message);
58 static void SetAllExtensions(unittest::TestAllExtensions* message);
59 static void SetOneofFields(unittest::TestAllExtensions* message);
60 static void SetAllFieldsAndExtensions(unittest::TestFieldOrderings* message);
[all …]
Dmap_lite_test_util.cc38 void MapLiteTestUtil::SetMapFields(unittest::TestMapLite* message) { in SetMapFields()
39 MapTestUtilImpl::SetMapFields<unittest::MapEnumLite, in SetMapFields()
40 unittest::MAP_ENUM_BAR_LITE, in SetMapFields()
41 unittest::MAP_ENUM_BAZ_LITE>(message); in SetMapFields()
44 void MapLiteTestUtil::SetArenaMapFields(unittest::TestArenaMapLite* message) { in SetArenaMapFields()
45 MapTestUtilImpl::SetArenaMapFields<unittest::MapEnumLite, in SetArenaMapFields()
46 unittest::MAP_ENUM_BAR_LITE, in SetArenaMapFields()
47 unittest::MAP_ENUM_BAZ_LITE>(message); in SetArenaMapFields()
50 void MapLiteTestUtil::SetMapFieldsInitialized(unittest::TestMapLite* message) { in SetMapFieldsInitialized()
54 void MapLiteTestUtil::ModifyMapFields(unittest::TestMapLite* message) { in ModifyMapFields()
[all …]
Dtest_util_lite.h43 namespace unittest = protobuf_unittest; variable
49 static void SetAllFields(unittest::TestAllTypesLite* message);
50 static void SetAllExtensions(unittest::TestAllExtensionsLite* message);
51 static void SetPackedFields(unittest::TestPackedTypesLite* message);
52 static void SetPackedExtensions(unittest::TestPackedExtensionsLite* message);
58 static void ModifyRepeatedFields(unittest::TestAllTypesLite* message);
60 unittest::TestAllExtensionsLite* message);
61 static void ModifyPackedFields(unittest::TestPackedTypesLite* message);
63 unittest::TestPackedExtensionsLite* message);
67 static void ExpectAllFieldsSet(const unittest::TestAllTypesLite& message);
[all …]
Dreflection_ops_unittest.cc52 unittest::TestAllTypes message; in TEST()
59 unittest::TestAllTypes message, message2; in TEST()
73 unittest::TestAllExtensions message, message2; in TEST()
83 unittest::TestOneof2 message, message2; in TEST()
98 unittest::TestAllTypes message, message2; in TEST()
125 unittest::TestAllExtensions message, message2; in TEST()
130 message2.SetExtension(unittest::optional_int32_extension, in TEST()
131 message.GetExtension(unittest::optional_int32_extension)); in TEST()
132 message.ClearExtension(unittest::optional_int32_extension); in TEST()
135 message2.SetExtension(unittest::optional_string_extension, in TEST()
[all …]
Dgenerated_message_reflection_unittest.cc68 unittest::TestAllTypes::descriptor()->FindFieldByName(name); in F()
75 unittest::TestAllTypes message; in TEST()
77 unittest::TestAllTypes::descriptor()); in TEST()
86 EXPECT_EQ(&unittest::TestAllTypes::OptionalGroup::default_instance(), in TEST()
88 EXPECT_EQ(&unittest::TestAllTypes::NestedMessage::default_instance(), in TEST()
90 EXPECT_EQ(&unittest::ForeignMessage::default_instance(), in TEST()
99 unittest::TestAllTypes message; in TEST()
101 unittest::TestAllTypes::descriptor()); in TEST()
114 unittest::TestAllTypes message; in TEST()
136 unittest::TestAllTypes message; in TEST()
[all …]
Dmessage_unittest.cc115 unittest::TestAllTypes message; in TEST()
128 unittest::TestPackedTypes message; in TEST()
184 unittest::TestRequired message; in TEST()
200 unittest::TestRequired message; in TEST()
207 unittest::TestRequired message; in TEST()
212 unittest::TestAllTypes test_all_types; in TEST()
216 google::protobuf::internal::DynamicCastToGenerated<unittest::TestAllTypes>( in TEST()
219 google::protobuf::internal::DynamicCastToGenerated<unittest::TestRequired>( in TEST()
225 google::protobuf::internal::DynamicCastToGenerated<const unittest::TestAllTypes>( in TEST()
229 google::protobuf::internal::DynamicCastToGenerated<const unittest::TestRequired>( in TEST()
[all …]
Dmap_test_util.h39 namespace unittest = ::protobuf_unittest; variable
44 static void SetMapFields(unittest::TestMap* message);
47 static void SetArenaMapFields(unittest::TestArenaMap* message);
50 static void SetMapFieldsInitialized(unittest::TestMap* message);
54 static void ModifyMapFields(unittest::TestMap* message);
58 static void ExpectMapFieldsSet(const unittest::TestMap& message);
62 static void ExpectArenaMapFieldsSet(const unittest::TestArenaMap& message);
67 const unittest::TestMap& message);
71 static void ExpectMapFieldsModified(const unittest::TestMap& message);
74 static void ExpectClear(const unittest::TestMap& message);
[all …]
Dwire_format_unittest.cc83 unittest::TestAllTypes source, dest; in TEST()
100 unittest::TestAllExtensions source, dest; in TEST()
117 unittest::TestPackedTypes source, dest; in TEST()
135 unittest::TestUnpackedTypes source; in TEST()
140 unittest::TestPackedTypes dest; in TEST()
151 unittest::TestPackedTypes source; in TEST()
156 unittest::TestUnpackedTypes dest; in TEST()
166 unittest::TestPackedExtensions source, dest; in TEST()
183 unittest::TestOneof2 source, dest; in TEST()
200 unittest::TestOneofBackwardsCompatible source; in TEST()
[all …]
/external/python/cpython2/Lib/unittest/test/
Dtest_suite.py1 import unittest
4 from unittest.test.support import LoggingResult, TestEquality
11 class Foo(unittest.TestCase):
18 return unittest.TestSuite(Test.Foo(n) for n in names)
23 class Test_TestSuite(unittest.TestCase, TestEquality):
29 eq_pairs = [(unittest.TestSuite(), unittest.TestSuite()),
30 (unittest.TestSuite(), unittest.TestSuite([])),
34 ne_pairs = [(unittest.TestSuite(), _mk_TestSuite('test_1')),
35 (unittest.TestSuite([]), _mk_TestSuite('test_1')),
49 suite = unittest.TestSuite()
[all …]
Dtest_loader.py5 import unittest
8 class Test_TestLoader(unittest.TestCase):
16 class Foo(unittest.TestCase):
21 tests = unittest.TestSuite([Foo('test_1'), Foo('test_2')])
23 loader = unittest.TestLoader()
31 class Foo(unittest.TestCase):
34 empty_suite = unittest.TestSuite()
36 loader = unittest.TestLoader()
49 class NotATestCase(unittest.TestSuite):
52 loader = unittest.TestLoader()
[all …]
Dtest_break.py10 import unittest
13 @unittest.skipUnless(hasattr(os, 'kill'), "Test requires os.kill")
14 @unittest.skipIf(sys.platform =="win32", "Test cannot run on Windows")
15 @unittest.skipIf(sys.platform == 'freebsd6', "Test kills regrtest on freebsd6 "
17 class TestBreak(unittest.TestCase):
27 unittest.signals._results = weakref.WeakKeyDictionary()
28 unittest.signals._interrupt_handler = None
33 unittest.installHandler()
42 self.assertTrue(unittest.signals._interrupt_handler.called)
45 result = unittest.TestResult()
[all …]
Dtest_skipping.py1 import unittest
3 from unittest.test.support import LoggingResult
6 class Test_TestSkipping(unittest.TestCase):
9 class Foo(unittest.TestCase):
20 class Foo(unittest.TestCase):
33 op_table = ((unittest.skipUnless, False, True),
34 (unittest.skipIf, True, False))
36 class Foo(unittest.TestCase):
44 suite = unittest.TestSuite([test_do_skip, test_dont_skip])
57 @unittest.skip("testing")
[all …]
Dtest_result.py7 import unittest
10 class Test_TestResult(unittest.TestCase):
21 result = unittest.TestResult()
36 result = unittest.TestResult()
45 class Foo(unittest.TestCase):
51 result = unittest.TestResult()
66 class Foo(unittest.TestCase):
72 result = unittest.TestResult()
93 result = unittest.TestResult()
117 class Foo(unittest.TestCase):
[all …]
Dtest_setups.py5 import unittest
9 return unittest.TestResult()
12 class TestSetups(unittest.TestCase):
15 return unittest.TextTestRunner(resultclass=resultFactory,
18 suite = unittest.TestSuite()
20 tests = unittest.defaultTestLoader.loadTestsFromTestCase(case)
26 realSuite = unittest.TestSuite()
29 suite.addTest(unittest.TestSuite())
30 realSuite.addTest(unittest.TestSuite())
34 class Test(unittest.TestCase):
[all …]
Dtest_runner.py1 import unittest
6 from unittest.test.support import (LoggingResult,
10 class TestCleanUp(unittest.TestCase):
13 class TestableTest(unittest.TestCase):
42 class TestableTest(unittest.TestCase):
76 class TestableTest(unittest.TestCase):
101 result = unittest.TestResult()
118 class TestableTest(unittest.TestCase):
141 class Test_TextTestRunner(unittest.TestCase):
145 runner = unittest.TextTestRunner()
[all …]
Dtest_program.py5 import unittest
6 import unittest.test
9 class Test_TestProgram(unittest.TestCase):
12 loader = unittest.TestLoader()
15 expectedPath = os.path.abspath(os.path.dirname(unittest.test.__file__))
39 oldParseArgs = unittest.TestProgram.parseArgs
41 unittest.TestProgram.parseArgs = oldParseArgs
42 unittest.TestProgram.parseArgs = lambda *args: None
46 del unittest.TestProgram.test
47 unittest.TestProgram.test = test
[all …]
Dtest_functiontestcase.py1 import unittest
3 from unittest.test.support import LoggingResult
6 class Test_FunctionTestCase(unittest.TestCase):
11 test = unittest.FunctionTestCase(lambda: None)
37 unittest.FunctionTestCase(test, setUp, tearDown).run(result)
63 unittest.FunctionTestCase(test, setUp, tearDown).run(result)
89 unittest.FunctionTestCase(test, setUp, tearDown).run(result)
115 unittest.FunctionTestCase(test, setUp, tearDown).run(result)
125 test = unittest.FunctionTestCase(lambda: None)
133 test = unittest.FunctionTestCase(lambda: None)
[all …]
/external/protobuf/src/google/protobuf/compiler/cpp/
Dcpp_unittest.cc116 unittest::TestAllTypes::descriptor()->file(); in TEST()
159 unittest::TestAllTypes message; in TEST()
166 EXPECT_EQ(&unittest::TestAllTypes::OptionalGroup::default_instance(), in TEST()
168 EXPECT_EQ(&unittest::TestAllTypes::NestedMessage::default_instance(), in TEST()
170 EXPECT_EQ(&unittest::ForeignMessage::default_instance(), in TEST()
192 const unittest::TestExtremeDefaultValues& extreme_default = in TEST()
193 unittest::TestExtremeDefaultValues::default_instance(); in TEST()
215 const unittest::TestExtremeDefaultValues& extreme_default = in TEST()
216 unittest::TestExtremeDefaultValues::default_instance(); in TEST()
222 const unittest::TestExtremeDefaultValues& extreme_default = in TEST()
[all …]
/external/antlr/antlr-3.4/runtime/Python/unittests/
Dtestexceptions.py1 import unittest
6 class TestRecognitionException(unittest.TestCase):
15 class TestEarlyExitException(unittest.TestCase):
25 class TestFailedPredicateException(unittest.TestCase):
35 class TestMismatchedNotSetException(unittest.TestCase):
45 class TestMismatchedRangeException(unittest.TestCase):
55 class TestMismatchedSetException(unittest.TestCase):
65 class TestMismatchedTokenException(unittest.TestCase):
75 class TestMismatchedTreeNodeException(unittest.TestCase):
85 class TestNoViableAltException(unittest.TestCase):
[all …]
/external/python/cpython2/Lib/test/
Dtest_posix.py18 import unittest
27 class PosixTester(unittest.TestCase):
56 @unittest.skipUnless(hasattr(posix, 'getresuid'),
64 @unittest.skipUnless(hasattr(posix, 'getresgid'),
72 @unittest.skipUnless(hasattr(posix, 'setresuid'),
80 @unittest.skipUnless(hasattr(posix, 'setresuid'),
89 @unittest.skipUnless(hasattr(posix, 'setresgid'),
97 @unittest.skipUnless(hasattr(posix, 'setresgid'),
106 @unittest.skipUnless(hasattr(posix, 'initgroups'),
123 raise unittest.SkipTest("need a pwd entry")
[all …]
Dtest_os.py7 import unittest
29 class FileTests(unittest.TestCase):
70 class TemporaryFileTests(unittest.TestCase):
88 @unittest.skipUnless(hasattr(os, 'tempnam'), 'test needs os.tempnam()')
103 @unittest.skipUnless(hasattr(os, 'tmpfile'), 'test needs os.tmpfile()')
153 @unittest.skipUnless(hasattr(os, 'tmpnam'), 'test needs os.tmpnam()')
183 class StatAttributeTests(unittest.TestCase):
195 @unittest.skipUnless(hasattr(os, 'stat'), 'test needs os.stat()')
256 @unittest.skipUnless(hasattr(os, 'statvfs'), 'test needs os.statvfs()')
320 @unittest.skipUnless(sys.platform == "win32", "Win32 specific tests")
[all …]
/external/antlr/antlr-3.4/runtime/Python/
Dxmlrunner.py15 import unittest
85 class _XMLTestResult(unittest.TestResult):
94 unittest.TestResult.__init__(self)
102 unittest.TestResult.startTest(self, test)
109 unittest.TestResult.stopTest(self, test)
119 unittest.TestResult.addError(self, test, err)
123 unittest.TestResult.addFailure(self, test, err)
216 class XMLTestRunnerTest(unittest.TestCase):
231 runner.run(unittest.makeSuite(test_class))
249 class TestTest(unittest.TestCase):
[all …]

12345678910>>...54