| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2013, Google Inc. All rights reserved. | 2 * Copyright (c) 2013, Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 30 matching lines...) Expand all Loading... |
| 41 // Can be removed if a pretty failure message isn't needed. | 41 // Can be removed if a pretty failure message isn't needed. |
| 42 #define EXPECT_NE_WITH_MESSAGE(a, b) \ | 42 #define EXPECT_NE_WITH_MESSAGE(a, b) \ |
| 43 EXPECT_NE(*a.second, *b.second) \ | 43 EXPECT_NE(*a.second, *b.second) \ |
| 44 << a.first \ | 44 << a.first \ |
| 45 << " (" << a.second->toString().latin1().data() << ")" \ | 45 << " (" << a.second->toString().latin1().data() << ")" \ |
| 46 << " == " \ | 46 << " == " \ |
| 47 << b.first \ | 47 << b.first \ |
| 48 << " (" << b.second->toString().latin1().data() << ")" \ | 48 << " (" << b.second->toString().latin1().data() << ")" \ |
| 49 << "\n"; | 49 << "\n"; |
| 50 | 50 |
| 51 namespace WebCore { | 51 namespace blink { |
| 52 | 52 |
| 53 namespace { | 53 namespace { |
| 54 | 54 |
| 55 using namespace WebCore; | 55 using namespace blink; |
| 56 | 56 |
| 57 class TimingFunctionTest : public ::testing::Test { | 57 class TimingFunctionTest : public ::testing::Test { |
| 58 public: | 58 public: |
| 59 void notEqualHelperLoop(Vector<std::pair<std::string, RefPtr<TimingFunction>
> >& v) | 59 void notEqualHelperLoop(Vector<std::pair<std::string, RefPtr<TimingFunction>
> >& v) |
| 60 { | 60 { |
| 61 for (size_t i = 0; i < v.size(); ++i) { | 61 for (size_t i = 0; i < v.size(); ++i) { |
| 62 for (size_t j = 0; j < v.size(); ++j) { | 62 for (size_t j = 0; j < v.size(); ++j) { |
| 63 if (i == j) | 63 if (i == j) |
| 64 continue; | 64 continue; |
| 65 EXPECT_NE_WITH_MESSAGE(v[i], v[j]); | 65 EXPECT_NE_WITH_MESSAGE(v[i], v[j]); |
| (...skipping 345 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 411 EXPECT_EQ(0.50, stepsTimingCustomEnd->evaluate(0.50, 0)); | 411 EXPECT_EQ(0.50, stepsTimingCustomEnd->evaluate(0.50, 0)); |
| 412 EXPECT_EQ(0.50, stepsTimingCustomEnd->evaluate(0.74, 0)); | 412 EXPECT_EQ(0.50, stepsTimingCustomEnd->evaluate(0.74, 0)); |
| 413 EXPECT_EQ(0.75, stepsTimingCustomEnd->evaluate(0.75, 0)); | 413 EXPECT_EQ(0.75, stepsTimingCustomEnd->evaluate(0.75, 0)); |
| 414 EXPECT_EQ(0.75, stepsTimingCustomEnd->evaluate(0.99, 0)); | 414 EXPECT_EQ(0.75, stepsTimingCustomEnd->evaluate(0.99, 0)); |
| 415 EXPECT_EQ(1.00, stepsTimingCustomEnd->evaluate(1.00, 0)); | 415 EXPECT_EQ(1.00, stepsTimingCustomEnd->evaluate(1.00, 0)); |
| 416 EXPECT_EQ(1.00, stepsTimingCustomEnd->evaluate(2.00, 0)); | 416 EXPECT_EQ(1.00, stepsTimingCustomEnd->evaluate(2.00, 0)); |
| 417 } | 417 } |
| 418 | 418 |
| 419 } // namespace | 419 } // namespace |
| 420 | 420 |
| 421 } // namespace WebCore | 421 } // namespace blink |
| OLD | NEW |