Home
last modified time | relevance | path

Searched refs:Throws (Results 1 – 25 of 76) sorted by relevance

1234

/external/libcxx/test/std/containers/sequences/deque/deque.modifiers/
Derase_iter.pass.cpp24 struct Throws { struct
25 Throws() : v_(0) {} in Throws() function
26 Throws(int v) : v_(v) {} in Throws() function
27 Throws(const Throws &rhs) : v_(rhs.v_) { if (sThrows) throw 1; } in Throws() argument
28 Throws( Throws &&rhs) : v_(rhs.v_) { if (sThrows) throw 1; } in Throws() argument
29 Throws& operator=(const Throws &rhs) { v_ = rhs.v_; return *this; } in operator =() argument
30 Throws& operator=( Throws &&rhs) { v_ = rhs.v_; return *this; } in operator =() argument
36 bool Throws::sThrows = false; argument
116 Throws arr[] = {1, 2, 3}; in main()
117 std::deque<Throws> v(arr, arr+3); in main()
[all …]
Derase_iter_iter.pass.cpp26 struct Throws { struct
27 Throws() : v_(0) {} in Throws() argument
28 Throws(int v) : v_(v) {} in Throws() argument
29 Throws(const Throws &rhs) : v_(rhs.v_) { if (sThrows) throw 1; } in Throws() function
30 Throws( Throws &&rhs) : v_(rhs.v_) { if (sThrows) throw 1; } in Throws() function
31 Throws& operator=(const Throws &rhs) { v_ = rhs.v_; return *this; } in operator =() argument
32 Throws& operator=( Throws &&rhs) { v_ = rhs.v_; return *this; } in operator =() argument
38 bool Throws::sThrows = false; argument
122 Throws arr[] = {1, 2, 3}; in main()
123 std::deque<Throws> v(arr, arr+3); in main()
[all …]
/external/libcxx/test/std/containers/sequences/vector/vector.modifiers/
Derase_iter.pass.cpp22 struct Throws { struct
23 Throws() : v_(0) {} in Throws() function
24 Throws(int v) : v_(v) {} in Throws() argument
25 Throws(const Throws &rhs) : v_(rhs.v_) { if (sThrows) throw 1; } in Throws() function
26 Throws( Throws &&rhs) : v_(rhs.v_) { if (sThrows) throw 1; } in Throws() function
27 Throws& operator=(const Throws &rhs) { v_ = rhs.v_; return *this; } in operator =() argument
28 Throws& operator=( Throws &&rhs) { v_ = rhs.v_; return *this; } in operator =() argument
33 bool Throws::sThrows = false; argument
94 Throws arr[] = {1, 2, 3}; in main()
95 std::vector<Throws> v(arr, arr+3); in main()
[all …]
Derase_iter_iter.pass.cpp22 struct Throws { struct
23 Throws() : v_(0) {} in Throws() argument
24 Throws(int v) : v_(v) {} in Throws() argument
25 Throws(const Throws &rhs) : v_(rhs.v_) { if (sThrows) throw 1; } in Throws() function
26 Throws( Throws &&rhs) : v_(rhs.v_) { if (sThrows) throw 1; } in Throws() argument
27 Throws& operator=(const Throws &rhs) { v_ = rhs.v_; return *this; } in operator =() argument
28 Throws& operator=( Throws &&rhs) { v_ = rhs.v_; return *this; } in operator =() argument
33 bool Throws::sThrows = false; argument
147 Throws arr[] = {1, 2, 3}; in main()
148 std::vector<Throws> v(arr, arr+3); in main()
[all …]
/external/protobuf/csharp/src/Google.Protobuf.Test/Collections/
DMapFieldTest.cs70 Assert.Throws<ArgumentNullException>(() => map.Add(0, nullValue)); in TestNullValues()
71 Assert.Throws<ArgumentNullException>(() => map[0] = nullValue); in TestNullValues()
80 Assert.Throws<ArgumentNullException>(() => map.Add(null, new ForeignMessage())); in Add_ForbidsNullKeys()
87 Assert.Throws<ArgumentNullException>(() => map[null] = new ForeignMessage()); in Indexer_ForbidsNullKeys()
187 Assert.Throws<ArgumentException>(() => map.Add("foo", "baz")); in Add_KeyAlreadyExists()
197 Assert.Throws<ArgumentException>(() => collection.Add(NewKeyValuePair("x", "z"))); in Add_Pair()
220 Assert.Throws<ArgumentNullException>(() => map.Remove(null)); in Remove_Key()
236 …Assert.Throws<ArgumentException>(() => collection.Remove(new KeyValuePair<string, string>(null, ""… in Remove_Pair()
266 Assert.Throws<KeyNotFoundException>(() => { var ignored = map["z"]; }); in Indexer_Get()
318 Assert.Throws<ArgumentException>(() => dictionary.Add("a", "duplicate")); in IDictionary_Add()
[all …]
DRepeatedFieldTest.cs51 Assert.Throws<ArgumentNullException>(() => list.Add((string)null)); in NullValuesRejected()
52 Assert.Throws<ArgumentNullException>(() => list.Add((IEnumerable<string>)null)); in NullValuesRejected()
53 Assert.Throws<ArgumentNullException>(() => list.Add((RepeatedField<string>)null)); in NullValuesRejected()
54 Assert.Throws<ArgumentNullException>(() => list.Contains(null)); in NullValuesRejected()
55 Assert.Throws<ArgumentNullException>(() => list.IndexOf(null)); in NullValuesRejected()
104 Assert.Throws<ArgumentOutOfRangeException>(() => list.RemoveAt(-1)); in RemoveAt_Invalid()
105 Assert.Throws<ArgumentOutOfRangeException>(() => list.RemoveAt(3)); in RemoveAt_Invalid()
124 Assert.Throws<ArgumentOutOfRangeException>(() => list.Insert(-1, "foo")); in Insert_Invalid()
125 Assert.Throws<ArgumentOutOfRangeException>(() => list.Insert(3, "foo")); in Insert_Invalid()
126 Assert.Throws<ArgumentNullException>(() => list.Insert(0, null)); in Insert_Invalid()
[all …]
/external/grpc-grpc/src/csharp/Grpc.Core.Tests/
DMetadataTest.cs42 Assert.Throws(typeof(ArgumentException), () => new Metadata.Entry("abc-bin", "xyz")); in AsciiEntry()
54 Assert.Throws(typeof(InvalidOperationException), () => { var v = entry.Value; }); in BinaryEntry()
57 Assert.Throws(typeof(ArgumentException), () => new Metadata.Entry("abc", bytes)); in BinaryEntry()
71 Assert.Throws(typeof(ArgumentException), () => new Metadata.Entry("abc[", "xyz")); in AsciiEntry_KeyValidity()
72 Assert.Throws(typeof(ArgumentException), () => new Metadata.Entry("abc/", "xyz")); in AsciiEntry_KeyValidity()
78 Assert.Throws(typeof(ArgumentNullException), () => new Metadata.Entry(null, "xyz")); in Entry_ConstructionPreconditions()
79 … Assert.Throws(typeof(ArgumentNullException), () => new Metadata.Entry("abc", (string)null)); in Entry_ConstructionPreconditions()
80 … Assert.Throws(typeof(ArgumentNullException), () => new Metadata.Entry("abc-bin", (byte[])null)); in Entry_ConstructionPreconditions()
114 Assert.Throws(typeof(InvalidOperationException), () => { var v = entry.Value; }); in Entry_CreateUnsafe_Binary()
212 Assert.Throws<InvalidOperationException>(() => metadata.Insert(0, entry)); in FreezeMakesReadOnly()
[all …]
DChannelCredentialsTest.cs39 …Assert.Throws(typeof(ArgumentNullException), () => ChannelCredentials.Create(null, new FakeCallCre… in ChannelCredentials_CreateComposite()
40 …Assert.Throws(typeof(ArgumentNullException), () => ChannelCredentials.Create(new FakeChannelCreden… in ChannelCredentials_CreateComposite()
43 …Assert.Throws(typeof(ArgumentException), () => ChannelCredentials.Create(new FakeChannelCredential… in ChannelCredentials_CreateComposite()
60 var ex1 = Assert.Throws(typeof(Exception), () => creds.GetNativeCredentials()); in ChannelCredentials_CreateExceptionIsCached()
61 var ex2 = Assert.Throws(typeof(Exception), () => creds.GetNativeCredentials()); in ChannelCredentials_CreateExceptionIsCached()
DChannelOptionsTest.cs38 Assert.Throws(typeof(InvalidOperationException), () => { var s = option.StringValue; }); in IntOption()
49 Assert.Throws(typeof(InvalidOperationException), () => { var s = option.IntValue; }); in StringOption()
55 Assert.Throws(typeof(ArgumentNullException), () => { new ChannelOption(null, "abc"); }); in ConstructorPreconditions()
56 Assert.Throws(typeof(ArgumentNullException), () => { new ChannelOption(null, 1); }); in ConstructorPreconditions()
57 Assert.Throws(typeof(ArgumentNullException), () => { new ChannelOption("abc", null); }); in ConstructorPreconditions()
DAuthPropertyTest.cs29 … Assert.Throws(typeof(ArgumentNullException), () => AuthProperty.Create(null, new byte[0])); in Create_NameIsNotNull()
30 … Assert.Throws(typeof(ArgumentNullException), () => AuthProperty.CreateUnsafe(null, new byte[0])); in Create_NameIsNotNull()
36 Assert.Throws(typeof(ArgumentNullException), () => AuthProperty.Create("abc", null)); in Create_ValueIsNotNull()
37 … Assert.Throws(typeof(ArgumentNullException), () => AuthProperty.CreateUnsafe("abc", null)); in Create_ValueIsNotNull()
DServerTest.cs80 Assert.Throws(typeof(IOException), () => server.Start()); in StartThrowsWithUnboundPorts()
92 …Assert.Throws(typeof(InvalidOperationException), () => server.Ports.Add("localhost", 9999, ServerC… in CannotModifyAfterStarted()
93 …Assert.Throws(typeof(InvalidOperationException), () => server.Services.Add(ServerServiceDefinition… in CannotModifyAfterStarted()
103 Assert.Throws(typeof(InvalidOperationException), () => server.Start()); in UnstartedServerCanBeShutdown()
DChannelTest.cs33 …Assert.Throws(typeof(ArgumentNullException), () => new Channel(null, ChannelCredentials.Insecure)); in Constructor_RejectsInvalidParams()
44 …Assert.Throws(typeof(ArgumentException), () => new Channel("127.0.0.1", ChannelCredentials.Insecur… in Constructor_RejectsDuplicateOptions()
113 … Assert.Throws(typeof(ObjectDisposedException), () => { var x = channel.ResolvedTarget; }); in OperationsThrowAfterShutdown()
/external/flatbuffers/tests/FlatBuffers.Test/
DByteBufferTests.cs48 Assert.Throws<ArgumentOutOfRangeException>(() => uut.PutByte(1, 99)); in ByteBuffer_PutByteCannotPutAtOffsetPastLength()
69 Assert.Throws<ArgumentOutOfRangeException>(() => uut.PutShort(2, 99)); in ByteBuffer_PutShortCannotPutAtOffsetPastLength()
78 Assert.Throws<ArgumentOutOfRangeException>(() => uut.PutShort(0, 99)); in ByteBuffer_PutShortChecksLength()
85 Assert.Throws<ArgumentOutOfRangeException>(() => uut.PutShort(1, 99)); in ByteBuffer_PutShortChecksLengthAndOffset()
108 Assert.Throws<ArgumentOutOfRangeException>(() => uut.PutInt(2, 0x0A0B0C0D)); in ByteBuffer_PutIntCannotPutAtOffsetPastLength()
115 Assert.Throws<ArgumentOutOfRangeException>(() => uut.PutInt(0, 0x0A0B0C0D)); in ByteBuffer_PutIntChecksLength()
122 Assert.Throws<ArgumentOutOfRangeException>(() => uut.PutInt(2, 0x0A0B0C0D)); in ByteBuffer_PutIntChecksLengthAndOffset()
149 Assert.Throws<ArgumentOutOfRangeException>(() => uut.PutLong(2, 0x010203040A0B0C0D)); in ByteBuffer_PutLongCannotPutAtOffsetPastLength()
156 Assert.Throws<ArgumentOutOfRangeException>(() => uut.PutLong(0, 0x010203040A0B0C0D)); in ByteBuffer_PutLongChecksLength()
163 Assert.Throws<ArgumentOutOfRangeException>(() => uut.PutLong(2, 0x010203040A0B0C0D)); in ByteBuffer_PutLongChecksLengthAndOffset()
[all …]
/external/clang/test/CodeGenCXX/
Dnew-array-init-exceptions.cpp4 struct Throws { struct
5 Throws(int);
6 Throws();
7 ~Throws();
20 new Throws[n] { 1, 2, 3 }; in cleanup()
36 new Throws[3] { 1, 2, 3 }; in cleanup()
/external/protobuf/csharp/src/Google.Protobuf.Test/
DJsonParserTest.cs71 … Assert.Throws<InvalidProtocolBufferException>(() => JsonParser.Default.Parse<TestMap>(json)); in IntegerMapKeysAreStrict()
195 … Assert.Throws<InvalidProtocolBufferException>(() => TestAllTypes.Parser.ParseJson(json)); in RepeatedField_NullElementProhibited()
211 Assert.Throws<InvalidProtocolBufferException>(() => TestMap.Parser.ParseJson(json)); in MapField_NullValueProhibited()
267 … Assert.Throws<InvalidProtocolBufferException>(() => TestAllTypes.Parser.ParseJson(json)); in StringToInt32_Invalid()
288 … Assert.Throws<InvalidProtocolBufferException>(() => TestAllTypes.Parser.ParseJson(json)); in StringToUInt32_Invalid()
311 … Assert.Throws<InvalidProtocolBufferException>(() => TestAllTypes.Parser.ParseJson(json)); in StringToInt64_Invalid()
332 … Assert.Throws<InvalidProtocolBufferException>(() => TestAllTypes.Parser.ParseJson(json)); in StringToUInt64_Invalid()
385 … Assert.Throws<InvalidProtocolBufferException>(() => TestAllTypes.Parser.ParseJson(json)); in StringToDouble_Invalid()
415 … Assert.Throws<InvalidProtocolBufferException>(() => TestAllTypes.Parser.ParseJson(json)); in StringToFloat_Invalid()
450 Assert.Throws(expectedExceptionType, () => TestAllTypes.Parser.ParseJson(json)); in NumberToInt32_Invalid()
[all …]
DCodedInputStreamTest.cs99 … var exception = Assert.Throws<InvalidProtocolBufferException>(() => input.ReadRawVarint32()); in AssertReadVarintFailure()
103 … exception = Assert.Throws<InvalidProtocolBufferException>(() => input.ReadRawVarint64()); in AssertReadVarintFailure()
107 …exception = Assert.Throws<InvalidProtocolBufferException>(() => CodedInputStream.ReadRawVarint32(n… in AssertReadVarintFailure()
284 Assert.Throws<InvalidProtocolBufferException>(() => input.ReadBytes()); in ReadMaliciouslyLargeBlob()
321 …Assert.Throws<InvalidProtocolBufferException>(() => TestRecursiveMessage.Parser.ParseFrom(data65)); in MaliciousRecursion()
324 … Assert.Throws<InvalidProtocolBufferException>(() => TestRecursiveMessage.Parser.ParseFrom(input)); in MaliciousRecursion()
334 … Assert.Throws<InvalidProtocolBufferException>(() => TestAllTypes.Parser.ParseFrom(input)); in SizeLimit()
422 Assert.Throws<InvalidProtocolBufferException>(() => input.ReadTag()); in Tag0Throws()
498 Assert.Throws<InvalidProtocolBufferException>(input.SkipLastField); in SkipGroup_WrongEndGroupTag()
515 Assert.Throws<InvalidProtocolBufferException>(input.SkipLastField); in RogueEndGroupTag()
[all …]
/external/flatbuffers/tests/
DphpTest.php349 $assert->Throws(new OutOfRangeException(), function() use ($uut) {
373 $assert->Throws(new OutOfRangeException(), function() use ($uut) {
380 $assert->Throws(new OutOfRangeException(), function() use ($uut) {
387 $assert->Throws(new OutOfRangeException(), function() use ($uut) {
411 $assert->Throws(new OutOfRangeException(), function() use ($uut) {
418 $assert->Throws(new OutOfRangeException(), function() use ($uut) {
425 $assert->Throws(new OutOfRangeException(), function() use ($uut) {
446 $assert->Throws(new OutOfRangeException(), function() use ($uut) {
453 $assert->Throws(new OutOfRangeException(), function() use ($uut) {
461 $assert->Throws(new OutOfRangeException(), function() use ($uut) {
[all …]
/external/grpc-grpc/src/csharp/Grpc.IntegrationTesting/
DGeneratedClientTest.cs39 …Assert.Throws(typeof(NotImplementedException), () => unimplementedClient.UnaryCall(new SimpleReque… in DefaultMethodStubThrows_UnaryCall()
45 … Assert.Throws(typeof(NotImplementedException), () => unimplementedClient.StreamingInputCall()); in DefaultMethodStubThrows_ClientStreaming()
51 …Assert.Throws(typeof(NotImplementedException), () => unimplementedClient.StreamingOutputCall(new S… in DefaultMethodStubThrows_ServerStreaming()
57 … Assert.Throws(typeof(NotImplementedException), () => unimplementedClient.FullDuplexCall()); in DefaultMethodStubThrows_DuplexStreaming()
/external/grpc-grpc/src/csharp/Grpc.HealthCheck.Tests/
DHealthServiceImplTest.cs60 var ex = Assert.Throws<RpcException>(() => GetStatusHelper(impl, "")); in ClearStatus()
73 Assert.Throws(typeof(RpcException), () => GetStatusHelper(impl, "")); in ClearAll()
74 … Assert.Throws(typeof(RpcException), () => GetStatusHelper(impl, "grpc.test.TestService")); in ClearAll()
81 …Assert.Throws(typeof(ArgumentNullException), () => impl.SetStatus(null, HealthCheckResponse.Types.… in NullsRejected()
83 Assert.Throws(typeof(ArgumentNullException), () => impl.ClearStatus(null)); in NullsRejected()
/external/grpc-grpc/src/csharp/Grpc.Core.Tests/Internal/
DAsyncCallTest.cs58 Assert.Throws(typeof(InvalidOperationException), in AsyncUnary_CanBeStartedOnlyOnce()
68 Assert.Throws(typeof(InvalidOperationException), in AsyncUnary_StreamingOperationsNotAllowed()
113 … Assert.Throws(typeof(ArgumentNullException), () => asyncCall.UnaryCallAsync(nullRequest)); in AsyncUnary_RequestSerializationExceptionDoesntLeakResources()
122 … Assert.Throws(typeof(InvalidOperationException), () => asyncCall.UnaryCallAsync("request1")); in AsyncUnary_StartCallFailureDoesntLeakResources()
131 Assert.Throws(typeof(ArgumentNullException), () => asyncCall.UnaryCall(nullRequest)); in SyncUnary_RequestSerializationExceptionDoesntLeakResources()
140 Assert.Throws(typeof(InvalidOperationException), () => asyncCall.UnaryCall("request1")); in SyncUnary_StartCallFailureDoesntLeakResources()
258 … Assert.Throws(typeof(InvalidOperationException), () => requestStream.WriteAsync("request2")); in ClientStreaming_WriteFailureThrowsRpcException3()
319 … Assert.Throws(typeof(InvalidOperationException), () => requestStream.WriteAsync("request1")); in ClientStreaming_WriteAfterCompleteThrowsInvalidOperationException()
370 … Assert.Throws(typeof(InvalidOperationException), () => asyncCall.ClientStreamingCallAsync()); in ClientStreaming_StartCallFailureDoesntLeakResources()
379 Assert.Throws(typeof(InvalidOperationException), in ServerStreaming_StreamingSendNotAllowed()
[all …]
DDefaultObjectPoolTest.cs75 … Assert.Throws<ArgumentNullException>(() => new DefaultObjectPool<TestPooledObject>(null, 10, 2)); in Constructor()
76 …Assert.Throws<ArgumentException>(() => new DefaultObjectPool<TestPooledObject>(() => new TestPoole… in Constructor()
77 …Assert.Throws<ArgumentException>(() => new DefaultObjectPool<TestPooledObject>(() => new TestPoole… in Constructor()
DTimespecTest.cs94 Assert.Throws(typeof(InvalidOperationException), in ToDateTime()
96 Assert.Throws(typeof(InvalidOperationException), in ToDateTime()
98 Assert.Throws(typeof(InvalidOperationException), in ToDateTime()
154 Assert.Throws(typeof(ArgumentException), in FromDateTime()
/external/grpc-grpc-java/examples/example-kotlin/src/main/kotlin/io/grpc/examples/helloworld/
DHelloWorldServer.kt35 @Throws(IOException::class)
61 @Throws(InterruptedException::class)
81 @Throws(IOException::class, InterruptedException::class)
/external/grpc-grpc/src/csharp/Grpc.Core.Tests/Interceptors/
DServerInterceptorTest.cs85 Assert.Throws<ArgumentNullException>(() => sd.Intercept(default(Interceptor))); in CheckNullInterceptorRegistrationFails()
86 Assert.Throws<ArgumentNullException>(() => sd.Intercept(new[]{default(Interceptor)})); in CheckNullInterceptorRegistrationFails()
87 …Assert.Throws<ArgumentNullException>(() => sd.Intercept(new[]{new ServerCallContextInterceptor(ctx… in CheckNullInterceptorRegistrationFails()
88 Assert.Throws<ArgumentNullException>(() => sd.Intercept(default(Interceptor[]))); in CheckNullInterceptorRegistrationFails()
/external/protobuf/csharp/src/Google.Protobuf.Test/Reflection/
DFieldAccessTest.cs154 …Assert.Throws<InvalidCastException>(() => fields[TestAllTypes.SingleBoolFieldNumber].Accessor.SetV… in SetValue_SingleFields_WrongType()
162 …Assert.Throws<InvalidOperationException>(() => fields[TestMap.MapStringStringFieldNumber].Accessor… in SetValue_MapFields()
170 …Assert.Throws<InvalidOperationException>(() => fields[TestAllTypes.RepeatedDoubleFieldNumber].Acce… in SetValue_RepeatedFields()
178 …Assert.Throws<InvalidCastException>(() => fields[TestAllTypes.SingleBoolFieldNumber].Accessor.GetV… in GetValue_IncorrectType()
214 Assert.Throws<KeyNotFoundException>(() => descriptor.Fields[999999].ToString()); in FieldDescriptor_NotFound()
215 Assert.Throws<KeyNotFoundException>(() => descriptor.Fields["not found"].ToString()); in FieldDescriptor_NotFound()

1234