This repository was archived by the owner on Feb 25, 2025. It is now read-only.
File tree 3 files changed +20
-2
lines changed
3 files changed +20
-2
lines changed Original file line number Diff line number Diff line change @@ -32,7 +32,10 @@ impeller_component("base") {
32
32
33
33
impeller_component (" base_unittests" ) {
34
34
testonly = true
35
- sources = [ " base_unittests.cc" ]
35
+ sources = [
36
+ " base_unittests.cc" ,
37
+ " validation_unittests.cc" ,
38
+ ]
36
39
deps = [
37
40
" :base" ,
38
41
" //flutter/testing" ,
Original file line number Diff line number Diff line change 11
11
namespace impeller {
12
12
13
13
static std::atomic_int32_t sValidationLogsDisabledCount = 0 ;
14
- static std::atomic_int32_t sValidationLogsAreFatal = 0 ;
14
+ static std::atomic_int32_t sValidationLogsAreFatal = 1 ;
15
15
16
16
void ImpellerValidationErrorsSetFatal (bool fatal) {
17
17
sValidationLogsAreFatal = fatal;
@@ -59,4 +59,15 @@ void ImpellerValidationBreak(const char* message) {
59
59
#endif // IMPELLER_ENABLE_VALIDATION
60
60
}
61
61
62
+ bool ImpellerValidationErrorsIsFatal () {
63
+ return sValidationLogsAreFatal ;
64
+ }
65
+
66
+ bool ImpellerValidationIsEnabled () {
67
+ #ifdef IMPELLER_ENABLE_VALIDATION
68
+ return true ;
69
+ #else
70
+ return false ;
71
+ #endif
72
+ }
62
73
} // namespace impeller
Original file line number Diff line number Diff line change @@ -39,6 +39,10 @@ void ImpellerValidationBreak(const char* message);
39
39
40
40
void ImpellerValidationErrorsSetFatal (bool fatal);
41
41
42
+ bool ImpellerValidationErrorsIsFatal ();
43
+
44
+ bool ImpellerValidationIsEnabled ();
45
+
42
46
struct ScopedValidationDisable {
43
47
ScopedValidationDisable ();
44
48
You can’t perform that action at this time.
0 commit comments