From fcae95ca96c5c276dddcc54061f95a8bed66a8e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joakim=20Nohlg=C3=A5rd?= Date: Fri, 15 Jun 2018 00:34:04 +0200 Subject: [PATCH] embunit: Const test case names --- sys/embunit/TestCaller.c | 2 +- sys/embunit/TestCase.c | 2 +- sys/include/embUnit/TestCaller.h | 4 ++-- sys/include/embUnit/TestCase.h | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/sys/embunit/TestCaller.c b/sys/embunit/TestCaller.c index 0028e2af63..66cf3e2ea6 100644 --- a/sys/embunit/TestCaller.c +++ b/sys/embunit/TestCaller.c @@ -36,7 +36,7 @@ #include "TestCase.h" #include "TestCaller.h" -char* TestCaller_name(TestCaller* self) +const char* TestCaller_name(TestCaller* self) { return self->name; } diff --git a/sys/embunit/TestCase.c b/sys/embunit/TestCase.c index 6efb5d8b44..0f24a7815c 100644 --- a/sys/embunit/TestCase.c +++ b/sys/embunit/TestCase.c @@ -39,7 +39,7 @@ static TestResult* result_; static TestCase* self_; -char* TestCase_name(TestCase* self) +const char* TestCase_name(TestCase* self) { return self->name; } diff --git a/sys/include/embUnit/TestCaller.h b/sys/include/embUnit/TestCaller.h index 0b99cd900f..c99bb4a375 100644 --- a/sys/include/embUnit/TestCaller.h +++ b/sys/include/embUnit/TestCaller.h @@ -43,7 +43,7 @@ typedef struct __TestFixture TestFixture; typedef struct __TestFixture* TestFixtureRef;/*downward compatible*/ struct __TestFixture { - char *name; + const char *name; void(*test)(void); }; @@ -54,7 +54,7 @@ typedef struct __TestCaller* TestCallerRef;/*downward compatible*/ struct __TestCaller { TestImplement* isa; - char *name; + const char *name; void(*setUp)(void); void(*tearDown)(void); int numberOfFixtuers; diff --git a/sys/include/embUnit/TestCase.h b/sys/include/embUnit/TestCase.h index 60e878012e..e191145400 100644 --- a/sys/include/embUnit/TestCase.h +++ b/sys/include/embUnit/TestCase.h @@ -44,7 +44,7 @@ typedef struct __TestCase* TestCaseRef;/*compatible embUnit1.0*/ struct __TestCase { TestImplement* isa; - char *name; + const char *name; void(*setUp)(void); void(*tearDown)(void); void(*runTest)(void);