| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2013 Google Inc. | 2 * Copyright 2013 Google Inc. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
| 5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
| 6 */ | 6 */ |
| 7 | 7 |
| 8 #include "SkMessageBus.h" | 8 #include "SkMessageBus.h" |
| 9 #include "Test.h" | 9 #include "Test.h" |
| 10 #include "TestClassDef.h" | |
| 11 | 10 |
| 12 namespace { | 11 namespace { |
| 13 | 12 |
| 14 struct TestMessage { | 13 struct TestMessage { |
| 15 int x; | 14 int x; |
| 16 float y; | 15 float y; |
| 17 }; | 16 }; |
| 18 | 17 |
| 19 } // namespace | 18 } // namespace |
| 20 | 19 |
| (...skipping 27 matching lines...) Expand all Loading... |
| 48 | 47 |
| 49 // Over all this time, inbox2 should have piled up 3 messages. | 48 // Over all this time, inbox2 should have piled up 3 messages. |
| 50 inbox2.poll(&messages); | 49 inbox2.poll(&messages); |
| 51 REPORTER_ASSERT(r, 3 == messages.count()); | 50 REPORTER_ASSERT(r, 3 == messages.count()); |
| 52 REPORTER_ASSERT(r, 5 == messages[0].x); | 51 REPORTER_ASSERT(r, 5 == messages[0].x); |
| 53 REPORTER_ASSERT(r, 6 == messages[1].x); | 52 REPORTER_ASSERT(r, 6 == messages[1].x); |
| 54 REPORTER_ASSERT(r, 1 == messages[2].x); | 53 REPORTER_ASSERT(r, 1 == messages[2].x); |
| 55 } | 54 } |
| 56 | 55 |
| 57 // Multithreaded tests tbd. | 56 // Multithreaded tests tbd. |
| OLD | NEW |