From 12c36bf17cc103d4042f42b18741f3ae2b6e52dc Mon Sep 17 00:00:00 2001 From: Dave Cherry Date: Mon, 12 Dec 2022 22:51:15 +0000 Subject: [PATCH] Fix for AVR memory usage --- src/testing/SimpleTest.cpp | 1 - src/testing/SimpleTest.h | 19 ------------------- 2 files changed, 20 deletions(-) diff --git a/src/testing/SimpleTest.cpp b/src/testing/SimpleTest.cpp index daedca5..cb50464 100644 --- a/src/testing/SimpleTest.cpp +++ b/src/testing/SimpleTest.cpp @@ -43,7 +43,6 @@ namespace SimpleTest { void UnitTestExecutor::setFailed(PGM_TYPE file, int line, const char *reason) { testStatus = FAILED; failureReason.withFileAndLine(file, line); - failureReason.withReason(reason); } void UnitTestExecutor::init(const char *name, bool ignored) { diff --git a/src/testing/SimpleTest.h b/src/testing/SimpleTest.h index 06c3cd7..4c84d6b 100644 --- a/src/testing/SimpleTest.h +++ b/src/testing/SimpleTest.h @@ -37,31 +37,12 @@ namespace SimpleTest { private: PGM_TYPE file; int line = 0; - char reason[FAIL_REASON_SIZE]; public: FailureInfo() {} void withFileAndLine(PGM_TYPE f, int l) { file = f; line = l; } - void withReason(const char* r) { - strncpy(reason, r, sizeof reason); - reason[sizeof(reason)-1] = 0; - } - - void copyFileToBuffer(char* sz, int len) const { - strncpy_P(sz, (char*)file, len); - sz[len-1] = 0; - } - - void copyReasonToBuffer(char* sz, int len) const { - strncpy(sz, reason, len); - sz[len-1] = 0; - } - - int getLine() const { - return line; - } }; class UnitTestExecutor {