OLD | NEW |
(Empty) | |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "platform/text/ICUError.h" |
| 6 |
| 7 #include "testing/gtest/include/gtest/gtest.h" |
| 8 |
| 9 namespace blink { |
| 10 |
| 11 const UErrorCode kTestErrorCode = U_INVALID_FORMAT_ERROR; |
| 12 |
| 13 void causeICUError(UErrorCode& err) { |
| 14 err = kTestErrorCode; |
| 15 } |
| 16 |
| 17 TEST(ICUErrorTest, assignToAutomaticReference) { |
| 18 ICUError icuError; |
| 19 EXPECT_EQ(icuError, U_ZERO_ERROR); |
| 20 causeICUError(icuError); |
| 21 EXPECT_EQ(icuError, kTestErrorCode); |
| 22 } |
| 23 |
| 24 } // namespace blink |
OLD | NEW |