mark a. foltz | ccc269d | 2023-01-31 10:28:21 -0800 | [diff] [blame^] | 1 | // Copyright 2023 The Chromium Authors |
| 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
| 4 | |
| 5 | #ifndef PLATFORM_TEST_BYTE_VIEW_TEST_UTIL_H_ |
| 6 | #define PLATFORM_TEST_BYTE_VIEW_TEST_UTIL_H_ |
| 7 | |
| 8 | namespace openscreen { |
| 9 | |
| 10 | class ByteView; |
| 11 | |
| 12 | // Asserts that `first` and `second` have the same non-zero length, and are |
| 13 | // views over the same bytes. (Not that they are the pointers to the same |
| 14 | // memory.) |
| 15 | void ExpectByteViewsHaveSameBytes(const ByteView& first, |
| 16 | const ByteView& second); |
| 17 | |
| 18 | // Asserts that `first` and `second` have the same non-zero length, but are |
| 19 | // views over different bytes. (Not that they are the pointers to different |
| 20 | // memory.) |
| 21 | void ExpectByteViewsHaveDifferentBytes(const ByteView& first, |
| 22 | const ByteView& second); |
| 23 | |
| 24 | } // namespace openscreen |
| 25 | |
| 26 | #endif // PLATFORM_TEST_BYTE_VIEW_TEST_UTIL_H_ |