Home
last modified time | relevance | path

Searched refs:assertThrows (Results 1 – 25 of 54) sorted by relevance

123

/third_party/jerryscript/tests/jerry/es2015/
Dexponentiation.js38 function assertThrows(src) { function
47 assertThrows("-2 ** 2")
48 assertThrows("+a ** 2")
49 assertThrows("!a ** 2")
50 assertThrows("~a ** 2")
51 assertThrows("void a ** 2")
52 assertThrows("typeof a ** 2")
53 assertThrows("delete a ** 2")
54 assertThrows("!(-a) ** 2")
Dregression-test-issue-3483.js15 function assertThrows(src) { function
24 assertThrows('Setting `o.bar` to');
25 assertThrows('Setting `o.bar`; Setting `o.bar` to');
26 assertThrows('Setting `o.bar`; Setting `o.bar`; Setting `o.bar` to');
Darray-species.js101 function assertThrows (a, b) { function
109 assertThrows(() => new MyThrowingArray().map(()=>{}), SpeciesError);
113 assertThrows(() => new MyThrowingArray().map(()=>{}), ConstructorError);
123 assertThrows(() => new FrozenArray([1]).map(()=>0), TypeError);
124 assertThrows(() => new FrozenArray([1]).filter(()=>true), TypeError);
125 assertThrows(() => new FrozenArray([1]).slice(0, 1), TypeError);
126 assertThrows(() => new FrozenArray([1]).splice(0, 1), TypeError);
127 assertThrows(() => new FrozenArray([]).concat([1]), TypeError);
Dregression-test-issue-3527.js15 function assertThrows(src) { function
24 assertThrows(`function $({
30 assertThrows(`function $({
/third_party/libphonenumber/metadata/src/test/java/com/google/i18n/phonenumbers/metadata/
DRangeSpecificationTest.java24 import static com.google.i18n.phonenumbers.metadata.testing.AssertUtil.assertThrows;
54 assertThrows(NullPointerException.class, () -> parse(null)); in testParseBad()
55 assertThrows(IllegalArgumentException.class, () -> parse("#")); in testParseBad()
56 assertThrows(IllegalArgumentException.class, () -> parse("[")); in testParseBad()
57 assertThrows(IllegalArgumentException.class, () -> parse("[]")); in testParseBad()
58 assertThrows(IllegalArgumentException.class, () -> parse("[0-")); in testParseBad()
59 assertThrows(IllegalArgumentException.class, () -> parse("[0-]")); in testParseBad()
60 assertThrows(IllegalArgumentException.class, () -> parse("[0--9]")); in testParseBad()
61 assertThrows(IllegalArgumentException.class, () -> parse("[0..9]")); in testParseBad()
62 assertThrows(IllegalArgumentException.class, () -> parse("[33]")); in testParseBad()
[all …]
DDigitSequenceTest.java20 import static com.google.i18n.phonenumbers.metadata.testing.AssertUtil.assertThrows;
34 assertThrows(IndexOutOfBoundsException.class, () -> DigitSequence.empty().getDigit(0)); in testEmpty()
57 assertThrows(NullPointerException.class, () -> DigitSequence.of(null)); in testBadArguments()
58 assertThrows(IllegalArgumentException.class, () -> DigitSequence.of("123X")); in testBadArguments()
60 assertThrows(IllegalArgumentException.class, () -> DigitSequence.of("1234567890123456789")); in testBadArguments()
/third_party/libphonenumber/metadata/src/test/java/com/google/i18n/phonenumbers/metadata/model/
DFormatSpecTest.java21 import static com.google.i18n.phonenumbers.metadata.testing.AssertUtil.assertThrows;
58 assertThrows(IllegalArgumentException.class, () -> national("")); in testCreate_national_bad()
59 assertThrows(IllegalArgumentException.class, () -> national("Hello")); in testCreate_national_bad()
60 assertThrows(IllegalArgumentException.class, () -> national("$1")); in testCreate_national_bad()
61 assertThrows(IllegalArgumentException.class, () -> national("XX**XX")); in testCreate_national_bad()
62 assertThrows(IllegalArgumentException.class, () -> national("****")); in testCreate_national_bad()
63 assertThrows(IllegalArgumentException.class, () -> national("@ XXX")); in testCreate_national_bad()
69 assertThrows(IllegalArgumentException.class, () -> international("#XXXX", "#XXXX")); in testCreate_international_bad()
71 assertThrows(IllegalArgumentException.class, () -> international("# XXXX", "XX XX")); in testCreate_international_bad()
72 assertThrows(IllegalArgumentException.class, () -> international("# XXXX", "XXX")); in testCreate_international_bad()
[all …]
/third_party/libphonenumber/metadata/src/test/java/com/google/i18n/phonenumbers/metadata/table/
DColumnTest.java24 import static com.google.i18n.phonenumbers.metadata.testing.AssertUtil.assertThrows;
40 assertThrows(ClassCastException.class, () -> column.cast("")); in testBooleanColumn()
49 assertThrows(IllegalArgumentException.class, () -> column.parse("TruE")); in testBooleanColumn()
50 assertThrows(IllegalArgumentException.class, () -> column.parse("FaLse")); in testBooleanColumn()
51 assertThrows(IllegalArgumentException.class, () -> Column.ofBoolean("Foo:Bar")); in testBooleanColumn()
61 assertThrows(ClassCastException.class, () -> column.cast(true)); in testStringColumn()
72 assertThrows(IllegalArgumentException.class, () -> Column.ofString("Foo:Bar")); in testStringColumn()
81 assertThrows(ClassCastException.class, () -> column.cast("")); in testEnumColumn()
89 assertThrows(IllegalArgumentException.class, () -> column.parse("fIxEdLiNe")); in testEnumColumn()
90 assertThrows(IllegalArgumentException.class, in testEnumColumn()
DSchemaTest.java21 import static com.google.i18n.phonenumbers.metadata.testing.AssertUtil.assertThrows;
61 assertThrows(IllegalArgumentException.class, () -> SCHEMA.getColumn("Region")); in test()
62 assertThrows(IllegalArgumentException.class, () -> SCHEMA.getColumn("Bogus")); in test()
69 assertThrows(IllegalArgumentException.class, () -> SCHEMA.checkColumn(BOGUS)); in testCheckColumn()
DAssignmentTest.java20 import static com.google.i18n.phonenumbers.metadata.testing.AssertUtil.assertThrows;
40 assertThrows(IllegalArgumentException.class, () -> Assignment.parse("C=Nope", SCHEMA)); in testParsing()
41 assertThrows(IllegalArgumentException.class, () -> Assignment.parse("X=NaN", SCHEMA)); in testParsing()
50 assertThrows(NullPointerException.class, () -> Assignment.of(COL_A, null)); in testOf()
DCsvParserTest.java21 import static com.google.i18n.phonenumbers.metadata.testing.AssertUtil.assertThrows;
79 assertThrows(IllegalArgumentException.class, () -> in testQuoting_illegal()
120 assertThrows(IllegalArgumentException.class, () -> in testMultiline_illegal()
123 assertThrows(IllegalArgumentException.class, () -> in testMultiline_illegal()
/third_party/icu/tools/cldr/cldr-to-icu/src/test/java/org/unicode/icu/tool/cldrtoicu/localedistance/
DDistanceTableTest.java6 import static org.unicode.icu.tool.cldrtoicu.testing.AssertUtils.assertThrows;
97 IllegalArgumentException e = assertThrows( in testBadDistance()
106 IllegalArgumentException e = assertThrows( in testBadParameters()
114 IllegalArgumentException e = assertThrows( in testBadKeys()
136 IllegalStateException e = assertThrows(IllegalStateException.class, builder::build); in testNoDefaultLanguage()
145 IllegalStateException e = assertThrows(IllegalStateException.class, builder::build); in testNoDefaultScript()
155 IllegalStateException e = assertThrows(IllegalStateException.class, builder::build); in testNoDefaultRegion()
DTrieTest.java7 import static org.unicode.icu.tool.cldrtoicu.testing.AssertUtils.assertThrows;
88 assertThrows( in testBadTrie_BadValue()
99 assertThrows(IllegalStateException.class, () -> trie.root().putPrefixAndValue(23)); in testBadTrie_NoPrefix()
108 assertThrows( in testBadTrie_BadPrefix()
119 assertThrows( in testBadTrie_NoStarInPrefix()
130 assertThrows(IllegalStateException.class, () -> infiniteRecursion(trie.root())); in testBadTrie_TooLong()
DTerritoryContainmentTest.java8 import static org.unicode.icu.tool.cldrtoicu.testing.AssertUtils.assertThrows;
50assertThrows(IllegalArgumentException.class, () -> TerritoryContainment.getContainment(testData)); in testMultipleRootsFails()
62assertThrows(IllegalArgumentException.class, () -> TerritoryContainment.getContainment(testData)); in testCyclicGraphFails()
/third_party/protobuf/js/compatibility_tests/v3.0.0/binary/
Dreader_test.js140 assertThrows(function() {
147 assertThrows(function() {reader.readFixed64()});
154 assertThrows(function() {reader.readFixed32()});
160 assertThrows(function() {reader.skipField()});
165 assertThrows(function() {reader.readInt32()});
166 assertThrows(function() {reader.readInt32String()});
167 assertThrows(function() {reader.readInt64()});
168 assertThrows(function() {reader.readInt64String()});
169 assertThrows(function() {reader.readUint32()});
170 assertThrows(function() {reader.readUint32String()});
[all …]
Ddecoder_test.js86 assertThrows(function() {writeValue.call(encoder, -1);});
87 assertThrows(function() {writeValue.call(encoder, upperLimit * 1.1);});
143 assertThrows(function() {writeValue.call(encoder, lowerLimit * 1.1);});
144 assertThrows(function() {writeValue.call(encoder, upperLimit * 1.1);});
221 assertThrows(function() {decoder.readUint64()});
226 assertThrows(function() {decoder.readUnsignedVarint64()});
228 assertThrows(function() {decoder.readSignedVarint64()});
230 assertThrows(function() {decoder.readZigzagVarint64()});
232 assertThrows(function() {decoder.readUnsignedVarint32()});
/third_party/protobuf/js/compatibility_tests/v3.1.0/binary/
Dreader_test.js140 assertThrows(function() {
147 assertThrows(function() {reader.readFixed64()});
154 assertThrows(function() {reader.readFixed32()});
160 assertThrows(function() {reader.skipField()});
165 assertThrows(function() {reader.readInt32()});
166 assertThrows(function() {reader.readInt32String()});
167 assertThrows(function() {reader.readInt64()});
168 assertThrows(function() {reader.readInt64String()});
169 assertThrows(function() {reader.readUint32()});
170 assertThrows(function() {reader.readUint32String()});
[all …]
Ddecoder_test.js86 assertThrows(function() {writeValue.call(encoder, -1);});
87 assertThrows(function() {writeValue.call(encoder, upperLimit * 1.1);});
232 assertThrows(function() {decoder.readUint64()});
237 assertThrows(function() {decoder.readUnsignedVarint64()});
239 assertThrows(function() {decoder.readSignedVarint64()});
241 assertThrows(function() {decoder.readZigzagVarint64()});
243 assertThrows(function() {decoder.readUnsignedVarint32()});
/third_party/libphonenumber/metadata/src/test/java/com/google/i18n/phonenumbers/metadata/i18n/
DSimpleLanguageTagTest.java19 import static com.google.i18n.phonenumbers.metadata.testing.AssertUtil.assertThrows;
35 assertThat(assertThrows(IllegalArgumentException.class, () -> SimpleLanguageTag.of("x"))) in testBadArgs()
37 assertThat(assertThrows(IllegalArgumentException.class, () -> SimpleLanguageTag.of("EN"))) in testBadArgs()
39 assertThat(assertThrows(IllegalArgumentException.class, () -> SimpleLanguageTag.of("003"))) in testBadArgs()
DPhoneRegionTest.java20 import static com.google.i18n.phonenumbers.metadata.testing.AssertUtil.assertThrows;
43 assertThat(assertThrows(IllegalArgumentException.class, () -> PhoneRegion.of("ABC"))) in testBadArgs()
46 assertThat(assertThrows(IllegalArgumentException.class, () -> PhoneRegion.of("us"))) in testBadArgs()
49 assertThat(assertThrows(IllegalArgumentException.class, () -> PhoneRegion.of("000"))) in testBadArgs()
/third_party/protobuf/js/binary/
Dreader_test.js140 assertThrows(function() {
147 assertThrows(function() {reader.readFixed64()});
154 assertThrows(function() {reader.readFixed32()});
160 assertThrows(function() {reader.skipField()});
165 assertThrows(function() {reader.readInt32()});
166 assertThrows(function() {reader.readInt32String()});
167 assertThrows(function() {reader.readInt64()});
168 assertThrows(function() {reader.readInt64String()});
169 assertThrows(function() {reader.readUint32()});
170 assertThrows(function() {reader.readUint32String()});
[all …]
/third_party/libphonenumber/java/libphonenumber/test/com/google/i18n/phonenumbers/metadata/init/
DMetadataParserTest.java20 import static org.junit.Assert.assertThrows;
37 assertThrows( in test_parse_shouldThrowExceptionForNullInput()
50 assertThrows( in test_parse_shouldThrowExceptionForEmptyInput()
63 assertThrows( in test_parse_shouldThrowExceptionForInvalidInput()
/third_party/quickjs/tests/
Dtest_bignum.js20 function assertThrows(err, func) function
107 assertThrows(SyntaxError, () => { BigInt("+") } );
108 assertThrows(SyntaxError, () => { BigInt("-") } );
109 assertThrows(SyntaxError, () => { BigInt("\x00a") } );
110 assertThrows(SyntaxError, () => { BigInt(" 123 r") } );
267 assertThrows(RangeError, () => { 10m / 3m } );
273 assertThrows(RangeError, () => { 2m ** 3.1m } );
274 assertThrows(RangeError, () => { 2m ** -3m } );
/third_party/icu/tools/cldr/cldr-to-icu/src/test/java/org/unicode/icu/tool/cldrtoicu/
DIcuDataTest.java6 import static org.unicode.icu.tool.cldrtoicu.testing.AssertUtils.assertThrows;
72 assertThrows(UnsupportedOperationException.class, () -> paths.add(RbPath.of("nope"))); in testGetPaths()
73 assertThrows(UnsupportedOperationException.class, () -> paths.remove(fooBar)); in testGetPaths()
74 assertThrows(UnsupportedOperationException.class, paths::clear); in testGetPaths()
/third_party/libphonenumber/java/libphonenumber/test/com/google/i18n/phonenumbers/metadata/source/
DMultiFileModeFileNameProviderTest.java19 import static org.junit.Assert.assertThrows;
36 assertThrows( in test_getFor_shouldThrowExceptionForNonAlphanumericKey()

123