ajm | 4297914 | 2015-09-14 18:41:13 | [diff] [blame] | 1 | // Copyright (c) 2015 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 <cmath> |
| 6 | |
jrummell | 37a54c0 | 2016-04-22 19:54:27 | [diff] [blame] | 7 | #include "media/base/audio_point.h" |
ajm | 4297914 | 2015-09-14 18:41:13 | [diff] [blame] | 8 | #include "testing/gtest/include/gtest/gtest.h" |
| 9 | |
| 10 | namespace media { |
| 11 | namespace { |
| 12 | |
| 13 | TEST(PointTest, PointsToString) { |
| 14 | std::vector<Point> points(1, Point(1, 0, 0.01f)); |
| 15 | points.push_back(Point(0, 2, 0.02f)); |
| 16 | EXPECT_EQ("1.000000,0.000000,0.010000, 0.000000,2.000000,0.020000", |
| 17 | PointsToString(points)); |
| 18 | |
| 19 | EXPECT_EQ("", PointsToString(std::vector<Point>())); |
| 20 | } |
| 21 | |
ajm | 4297914 | 2015-09-14 18:41:13 | [diff] [blame] | 22 | } // namespace |
| 23 | } // namespace media |