| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "testing/gtest/include/gtest/gtest.h" | 5 #include "testing/gtest/include/gtest/gtest.h" |
| 6 #include "ui/base/range/range.h" | 6 #include "ui/base/range/range.h" |
| 7 | 7 |
| 8 TEST(RangeTest, FromNSRange) { | 8 TEST(RangeTest, FromNSRange) { |
| 9 NSRange nsr = NSMakeRange(10, 3); | 9 NSRange nsr = NSMakeRange(10, 3); |
| 10 ui::Range r(nsr); | 10 ui::Range r(nsr); |
| (...skipping 23 matching lines...) Expand all Loading... |
| 34 ui::Range r(nsr); | 34 ui::Range r(nsr); |
| 35 EXPECT_FALSE(r.IsValid()); | 35 EXPECT_FALSE(r.IsValid()); |
| 36 } | 36 } |
| 37 | 37 |
| 38 TEST(RangeTest, ToNSRangeInvalid) { | 38 TEST(RangeTest, ToNSRangeInvalid) { |
| 39 ui::Range r(ui::Range::InvalidRange()); | 39 ui::Range r(ui::Range::InvalidRange()); |
| 40 NSRange nsr = r.ToNSRange(); | 40 NSRange nsr = r.ToNSRange(); |
| 41 EXPECT_EQ(NSNotFound, nsr.location); | 41 EXPECT_EQ(NSNotFound, nsr.location); |
| 42 EXPECT_EQ(0U, nsr.length); | 42 EXPECT_EQ(0U, nsr.length); |
| 43 } | 43 } |
| OLD | NEW |