OLD | NEW |
1 // Copyright 2014 The Crashpad Authors. All rights reserved. | 1 // Copyright 2014 The Crashpad Authors. All rights reserved. |
2 // | 2 // |
3 // Licensed under the Apache License, Version 2.0 (the "License"); | 3 // Licensed under the Apache License, Version 2.0 (the "License"); |
4 // you may not use this file except in compliance with the License. | 4 // you may not use this file except in compliance with the License. |
5 // You may obtain a copy of the License at | 5 // You may obtain a copy of the License at |
6 // | 6 // |
7 // http://www.apache.org/licenses/LICENSE-2.0 | 7 // http://www.apache.org/licenses/LICENSE-2.0 |
8 // | 8 // |
9 // Unless required by applicable law or agreed to in writing, software | 9 // Unless required by applicable law or agreed to in writing, software |
10 // distributed under the License is distributed on an "AS IS" BASIS, | 10 // distributed under the License is distributed on an "AS IS" BASIS, |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
110 EXPECT_EQ(index, old_state[index]); | 110 EXPECT_EQ(index, old_state[index]); |
111 } | 111 } |
112 | 112 |
113 // Use a flavor known to be different from the incoming flavor, for a test | 113 // Use a flavor known to be different from the incoming flavor, for a test |
114 // of the “out” side of the inout flavor parameter. | 114 // of the “out” side of the inout flavor parameter. |
115 *flavor = exception_ + 20; | 115 *flavor = exception_ + 20; |
116 *new_state_count = MACHINE_THREAD_STATE_COUNT; | 116 *new_state_count = MACHINE_THREAD_STATE_COUNT; |
117 | 117 |
118 // Send a new state back to the client. | 118 // Send a new state back to the client. |
119 for (size_t index = 0; index < *new_state_count; ++index) { | 119 for (size_t index = 0; index < *new_state_count; ++index) { |
120 EXPECT_EQ(0u, new_state[index]); | |
121 new_state[index] = MACHINE_THREAD_STATE_COUNT - index; | 120 new_state[index] = MACHINE_THREAD_STATE_COUNT - index; |
122 } | 121 } |
123 } else { | 122 } else { |
124 EXPECT_EQ(THREAD_STATE_NONE, *flavor); | 123 EXPECT_EQ(THREAD_STATE_NONE, *flavor); |
125 EXPECT_EQ(0u, old_state_count); | 124 EXPECT_EQ(0u, old_state_count); |
126 EXPECT_EQ(nullptr, old_state); | 125 EXPECT_EQ(nullptr, old_state); |
127 EXPECT_EQ(0u, *new_state_count); | 126 EXPECT_EQ(0u, *new_state_count); |
128 EXPECT_EQ(nullptr, new_state); | 127 EXPECT_EQ(nullptr, new_state); |
129 } | 128 } |
130 | 129 |
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
284 | 283 |
285 TestExcClientVariants test_exc_client_variants(behavior, true); | 284 TestExcClientVariants test_exc_client_variants(behavior, true); |
286 test_exc_client_variants.Run(); | 285 test_exc_client_variants.Run(); |
287 } | 286 } |
288 } | 287 } |
289 } | 288 } |
290 | 289 |
291 } // namespace | 290 } // namespace |
292 } // namespace test | 291 } // namespace test |
293 } // namespace crashpad | 292 } // namespace crashpad |
OLD | NEW |