class ThreadingModelFixture

Defined at line 73 of file ../../src/media/audio/audio_core/testing/threading_model_fixture.h

A test fixture that provides a |ThreadingModel| on top of an |async::TestLoop|. We inherit from

|gtest::TestLoopFixture| to make it simple to convert tests that are already using test loops.

Ex:

TEST_F(MyTest, Foo) {

UnderTest bar(

&threading

_model());

bar.ScheduleSomeWork();

RunLoopUntilIdle();

AssertScheduledWorkCompleted(

&bar

);

}

Public Methods

void ThreadingModelFixture (ProcessConfig config, ClockFactoryMode mode)

Defined at line 80 of file ../../src/media/audio/audio_core/testing/threading_model_fixture.h

void ThreadingModelFixture (ClockFactoryMode mode)

The default constructor provides a reasonable valid default configuration.

Defined at line 93 of file ../../src/media/audio/audio_core/testing/threading_model_fixture.h

Protected Methods

ThreadingModel & threading_model ()

This threading model will be backed by an |async::TestLoop|. Control the loop using the methods

in |gtest::TestLoopFixture|.

Defined at line 108 of file ../../src/media/audio/audio_core/testing/threading_model_fixture.h

Context & context ()

Defined at line 110 of file ../../src/media/audio/audio_core/testing/threading_model_fixture.h

FakePlugDetector * fake_plug_detector ()

Defined at line 112 of file ../../src/media/audio/audio_core/testing/threading_model_fixture.h

Enumerations

enum ClockFactoryMode
Name Value
WithSyntheticClocks 0
WithRealClocks 1

Defined at line 75 of file ../../src/media/audio/audio_core/testing/threading_model_fixture.h