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

[Impeller] Always enable validation for goldens #41574

Merged
merged 1 commit into from
Apr 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion impeller/aiks/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,10 @@ impeller_component("aiks_unittests") {
impeller_component("aiks_unittests_golden") {
testonly = true

defines = [ "IMPELLER_GOLDEN_TESTS" ]
defines = [
"IMPELLER_GOLDEN_TESTS",
"IMPELLER_ENABLE_VALIDATION=1",
]

sources = [ "aiks_unittests.cc" ]
deps = [
Expand Down
2 changes: 1 addition & 1 deletion impeller/base/validation.cc
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ std::ostream& ValidationLog::GetStream() {

void ImpellerValidationBreak(const char* message) {
// Nothing to do. Exists for the debugger.
#ifdef IMPELLER_DEBUG
#ifdef IMPELLER_ENABLE_VALIDATION
std::stringstream stream;
stream << "Break on '" << __FUNCTION__
<< "' to inspect point of failure: " << message;
Expand Down
6 changes: 6 additions & 0 deletions impeller/base/validation.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@

#pragma once

#ifndef IMPELLER_ENABLE_VALIDATION
#ifdef IMPELLER_DEBUG
#define IMPELLER_ENABLE_VALIDATION 1
#endif
#endif

#include <sstream>

#include "flutter/fml/macros.h"
Expand Down