src/media/audio/audio_core/audio_clock_unittest.cc
// Verify operator bool and is_valid(), and being subsequently set
Verify operator bool and is_valid(), and being subsequently set
Verify operator bool and is_valid () and being subsequently set
TEST(AudioClockTest, Basic) {
  AudioClock default_audio_clock;
  EXPECT_FALSE(default_audio_clock);
  EXPECT_FALSE(default_audio_clock.is_valid());
  auto audio_clock = AudioClock::CreateAsCustom(clock::CloneOfMonotonic());
  EXPECT_TRUE(audio_clock);
  EXPECT_TRUE(audio_clock.is_valid());
  auto time1 = audio_clock.Read().get();
  auto time2 = audio_clock.Read().get();
  EXPECT_LT(time1, time2);
}
TEST ( AudioClockTest , Basic ) { AudioClock default_audio_clock ; EXPECT_FALSE ( default_audio_clock ) ; EXPECT_FALSE ( default_audio_clock . is_valid ( ) ) ; auto audio_clock = AudioClock :: CreateAsCustom ( clock :: CloneOfMonotonic ( ) ) ; EXPECT_TRUE ( audio_clock ) ; EXPECT_TRUE ( audio_clock . is_valid ( ) ) ; auto time1 = audio_clock . Read ( ) . get ( ) ; auto time2 = audio_clock . Read ( ) . get ( ) ; EXPECT_LT ( time1 , time2 ) ; }
Verify operator bool and is_valid(), and being subsequently set
Verify operator bool and is_valid () and being subsequently set