Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Functions
TestTest.cpp File Reference
#include "tests/CtsEnforcement.h"
#include "tests/Test.h"

Go to the source code of this file.

Functions

 DEF_TEST (TestNormal, reporter)
 
 DEF_CONDITIONAL_TEST (TestTrueCondition, reporter, 1==1)
 
 DEF_CONDITIONAL_TEST (TestFalseCondition, reporter, 1==0)
 
 DEF_GANESH_TEST (TestGpuFactory, reporter, factory, CtsEnforcement::kNever)
 
 DEF_GANESH_TEST_FOR_ALL_CONTEXTS (TestGpuAllContexts, reporter, ctxInfo, CtsEnforcement::kNever)
 
 DEF_GANESH_TEST_FOR_RENDERING_CONTEXTS (TestGpuRenderingContexts, reporter, ctxInfo, CtsEnforcement::kNever)
 
 DEF_GANESH_TEST_FOR_MOCK_CONTEXT (TestMockContext, reporter, ctxInfo)
 
 DEF_CONDITIONAL_GANESH_TEST_FOR_ALL_CONTEXTS (TestGpuAllContextsWithTrueCondition, reporter, ctxInfo, true, CtsEnforcement::kNever)
 
 DEF_CONDITIONAL_GANESH_TEST_FOR_ALL_CONTEXTS (TestGpuAllContextsWithFalseCondition, reporter, ctxInfo, false, CtsEnforcement::kNever)
 
 DEF_CONDITIONAL_GANESH_TEST_FOR_RENDERING_CONTEXTS (TestGpuRenderingContextsWithTrueCondition, reporter, ctxInfo, true, CtsEnforcement::kNever)
 
 DEF_CONDITIONAL_GANESH_TEST_FOR_RENDERING_CONTEXTS (TestGpuRenderingContextsWithFalseCondition, reporter, ctxInfo, false, CtsEnforcement::kNever)
 
 DEF_TEST (TestCtsEnforcement, reporter)
 

Function Documentation

◆ DEF_CONDITIONAL_GANESH_TEST_FOR_ALL_CONTEXTS() [1/2]

DEF_CONDITIONAL_GANESH_TEST_FOR_ALL_CONTEXTS ( TestGpuAllContextsWithFalseCondition  ,
reporter  ,
ctxInfo  ,
false  ,
CtsEnforcement::kNever   
)

Definition at line 68 of file TestTest.cpp.

69 {
70 ERRORF(reporter, "DEF_CONDITIONAL_GANESH_TEST_FOR_ALL_CONTEXTS ran with a false condition");
71}
reporter
#define ERRORF(r,...)
Definition Test.h:293

◆ DEF_CONDITIONAL_GANESH_TEST_FOR_ALL_CONTEXTS() [2/2]

DEF_CONDITIONAL_GANESH_TEST_FOR_ALL_CONTEXTS ( TestGpuAllContextsWithTrueCondition  ,
reporter  ,
ctxInfo  ,
true  ,
CtsEnforcement::kNever   
)

Definition at line 62 of file TestTest.cpp.

63 {
65 REPORTER_ASSERT(reporter, ctxInfo.directContext());
66}
#define REPORTER_ASSERT(r, cond,...)
Definition Test.h:286

◆ DEF_CONDITIONAL_GANESH_TEST_FOR_RENDERING_CONTEXTS() [1/2]

DEF_CONDITIONAL_GANESH_TEST_FOR_RENDERING_CONTEXTS ( TestGpuRenderingContextsWithFalseCondition  ,
reporter  ,
ctxInfo  ,
false  ,
CtsEnforcement::kNever   
)

Definition at line 84 of file TestTest.cpp.

88 {
90 "DEF_CONDITIONAL_GANESH_TEST_FOR_RENDERING_CONTEXTS ran "
91 "with a false condition");
92}

◆ DEF_CONDITIONAL_GANESH_TEST_FOR_RENDERING_CONTEXTS() [2/2]

DEF_CONDITIONAL_GANESH_TEST_FOR_RENDERING_CONTEXTS ( TestGpuRenderingContextsWithTrueCondition  ,
reporter  ,
ctxInfo  ,
true  ,
CtsEnforcement::kNever   
)

Definition at line 75 of file TestTest.cpp.

79 {
81 REPORTER_ASSERT(reporter, ctxInfo.directContext());
82}

◆ DEF_CONDITIONAL_TEST() [1/2]

DEF_CONDITIONAL_TEST ( TestFalseCondition  ,
reporter  ,
= = 0 
)

Definition at line 25 of file TestTest.cpp.

25 {
26 ERRORF(reporter, "DEF_CONDITIONAL_TEST executed a test with a false condition");
27}

◆ DEF_CONDITIONAL_TEST() [2/2]

DEF_CONDITIONAL_TEST ( TestTrueCondition  ,
reporter  ,
= = 1 
)

Definition at line 20 of file TestTest.cpp.

◆ DEF_GANESH_TEST()

DEF_GANESH_TEST ( TestGpuFactory  ,
reporter  ,
factory  ,
CtsEnforcement::kNever   
)

Definition at line 32 of file TestTest.cpp.

◆ DEF_GANESH_TEST_FOR_ALL_CONTEXTS()

DEF_GANESH_TEST_FOR_ALL_CONTEXTS ( TestGpuAllContexts  ,
reporter  ,
ctxInfo  ,
CtsEnforcement::kNever   
)

Definition at line 38 of file TestTest.cpp.

38 {
40 REPORTER_ASSERT(reporter, ctxInfo.directContext());
41}

◆ DEF_GANESH_TEST_FOR_MOCK_CONTEXT()

DEF_GANESH_TEST_FOR_MOCK_CONTEXT ( TestMockContext  ,
reporter  ,
ctxInfo   
)

Definition at line 55 of file TestTest.cpp.

55 {
57 REPORTER_ASSERT(reporter, ctxInfo.directContext());
58}

◆ DEF_GANESH_TEST_FOR_RENDERING_CONTEXTS()

DEF_GANESH_TEST_FOR_RENDERING_CONTEXTS ( TestGpuRenderingContexts  ,
reporter  ,
ctxInfo  ,
CtsEnforcement::kNever   
)

Definition at line 45 of file TestTest.cpp.

48 {
50 REPORTER_ASSERT(reporter, ctxInfo.directContext());
51}

◆ DEF_TEST() [1/2]

DEF_TEST ( TestCtsEnforcement  ,
reporter   
)

Definition at line 94 of file TestTest.cpp.

94 {
95 auto verifyRunMode = [&](CtsEnforcement e, int apiLevel, CtsEnforcement::RunMode runMode) {
96 REPORTER_ASSERT(reporter, e.eval(apiLevel) == runMode);
97 };
98
100 verifyRunMode(e1, 0, CtsEnforcement::RunMode::kSkip);
103
105 verifyRunMode(e2, 0, CtsEnforcement::RunMode::kSkip);
108
110 verifyRunMode(e3, 0, CtsEnforcement::RunMode::kSkip);
113
116 verifyRunMode(e4, 0, CtsEnforcement::RunMode::kSkip);
119}
float e1
constexpr CtsEnforcement & withWorkarounds(ApiLevel workaroundVersion)

◆ DEF_TEST() [2/2]

DEF_TEST ( TestNormal  ,
reporter   
)

Definition at line 15 of file TestTest.cpp.