| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 <stddef.h> |
| 6 |
| 7 #include "base/macros.h" |
| 5 #include "base/strings/string_number_conversions.h" | 8 #include "base/strings/string_number_conversions.h" |
| 6 #include "media/audio/audio_parameters.h" | 9 #include "media/audio/audio_parameters.h" |
| 7 #include "testing/gtest/include/gtest/gtest.h" | 10 #include "testing/gtest/include/gtest/gtest.h" |
| 8 | 11 |
| 9 namespace media { | 12 namespace media { |
| 10 | 13 |
| 11 TEST(AudioParameters, Constructor_Default) { | 14 TEST(AudioParameters, Constructor_Default) { |
| 12 AudioParameters::Format expected_format = AudioParameters::AUDIO_PCM_LINEAR; | 15 AudioParameters::Format expected_format = AudioParameters::AUDIO_PCM_LINEAR; |
| 13 int expected_bits = 0; | 16 int expected_bits = 0; |
| 14 int expected_channels = 0; | 17 int expected_channels = 0; |
| (...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 214 | 217 |
| 215 AudioParameters params(AudioParameters::AUDIO_PCM_LOW_LATENCY, | 218 AudioParameters params(AudioParameters::AUDIO_PCM_LOW_LATENCY, |
| 216 expected_layout, 44100, 16, 880); | 219 expected_layout, 44100, 16, 880); |
| 217 params.set_channels_for_discrete(expected_channels); | 220 params.set_channels_for_discrete(expected_channels); |
| 218 EXPECT_EQ(expected_channels, params.channels()); | 221 EXPECT_EQ(expected_channels, params.channels()); |
| 219 EXPECT_EQ(expected_layout, params.channel_layout()); | 222 EXPECT_EQ(expected_layout, params.channel_layout()); |
| 220 EXPECT_TRUE(params.IsValid()); | 223 EXPECT_TRUE(params.IsValid()); |
| 221 } | 224 } |
| 222 | 225 |
| 223 } // namespace media | 226 } // namespace media |
| OLD | NEW |