28 if (!fContextStack.empty()) {
30 for (
int i = 0; i < fContextStack.size(); ++i) {
34 fullMessage.
append(fContextStack[i]);
38 this->reportFailed(
skiatest::Failure(f.fileName, f.lineNo, f.condition, fullMessage));
45 if (strlen(this->condition) > 0) {
49 result.append(this->condition);
54 if (!FLAGS_tmpDir.isEmpty()) {
57#ifdef SK_BUILD_FOR_ANDROID
58 const char* environmentVariable =
"TMPDIR";
59 const char* defaultValue =
"/data/local/tmp";
60#elif defined(SK_BUILD_FOR_MAC) || defined(SK_BUILD_FOR_UNIX)
61 const char* environmentVariable =
"TMPDIR";
62 const char* defaultValue =
"/tmp";
63#elif defined(SK_BUILD_FOR_WIN)
64 const char* environmentVariable =
"TEMP";
65 const char* defaultValue =
nullptr;
67 const char* environmentVariable =
nullptr;
68 const char* defaultValue =
nullptr;
70 const char* tmpdir = environmentVariable ? getenv(environmentVariable) :
nullptr;
71 return SkString(tmpdir ? tmpdir : defaultValue);
83 const double elapsedMs = this->elapsedMs();
85 return static_cast<SkMSec>(elapsedMs);
#define DEFINE_string2(name, shortName, defaultValue, helpString)
SK_API SkString static SkString SkStringPrintf()
static constexpr SkMSec SK_MSecMax
void append(const char text[])
void reportFailedWithContext(const skiatest::Failure &)
virtual void bumpTestCount()
virtual bool verbose() const
virtual bool allowExtendedTest() const
SkMSec elapsedMsInt() const
SkString toString() const