Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit 7230769

Browse files
committed
[Impeller] Always enable validation for goldens
1 parent 54ad0b6 commit 7230769

File tree

3 files changed

+11
-2
lines changed

3 files changed

+11
-2
lines changed

impeller/aiks/BUILD.gn

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,10 @@ impeller_component("aiks_unittests") {
6161
impeller_component("aiks_unittests_golden") {
6262
testonly = true
6363

64-
defines = [ "IMPELLER_GOLDEN_TESTS" ]
64+
defines = [
65+
"IMPELLER_GOLDEN_TESTS",
66+
"IMPELLER_ENABLE_VALIDATION=1",
67+
]
6568

6669
sources = [ "aiks_unittests.cc" ]
6770
deps = [

impeller/base/validation.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ std::ostream& ValidationLog::GetStream() {
3939

4040
void ImpellerValidationBreak(const char* message) {
4141
// Nothing to do. Exists for the debugger.
42-
#ifdef IMPELLER_DEBUG
42+
#ifdef IMPELLER_ENABLE_VALIDATION
4343
std::stringstream stream;
4444
stream << "Break on '" << __FUNCTION__
4545
<< "' to inspect point of failure: " << message;

impeller/base/validation.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@
44

55
#pragma once
66

7+
#ifndef IMPELLER_ENABLE_VALIDATION
8+
#ifdef IMPELLER_DEBUG
9+
#define IMPELLER_ENABLE_VALIDATION 1
10+
#endif
11+
#endif
12+
713
#include <sstream>
814

915
#include "flutter/fml/macros.h"

0 commit comments

Comments
 (0)