Skip to content
Snippets Groups Projects
Unverified Commit 21bc3ca5 authored by Joakim Nohlgård's avatar Joakim Nohlgård Committed by GitHub
Browse files

Merge pull request #9360 from gebart/pr/embunit-const

embunit: Const test case names
parents 4f8c3b7d fcae95ca
No related branches found
No related tags found
No related merge requests found
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
#include "TestCase.h" #include "TestCase.h"
#include "TestCaller.h" #include "TestCaller.h"
char* TestCaller_name(TestCaller* self) const char* TestCaller_name(TestCaller* self)
{ {
return self->name; return self->name;
} }
......
...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
static TestResult* result_; static TestResult* result_;
static TestCase* self_; static TestCase* self_;
char* TestCase_name(TestCase* self) const char* TestCase_name(TestCase* self)
{ {
return self->name; return self->name;
} }
......
...@@ -43,7 +43,7 @@ typedef struct __TestFixture TestFixture; ...@@ -43,7 +43,7 @@ typedef struct __TestFixture TestFixture;
typedef struct __TestFixture* TestFixtureRef;/*downward compatible*/ typedef struct __TestFixture* TestFixtureRef;/*downward compatible*/
struct __TestFixture { struct __TestFixture {
char *name; const char *name;
void(*test)(void); void(*test)(void);
}; };
...@@ -54,7 +54,7 @@ typedef struct __TestCaller* TestCallerRef;/*downward compatible*/ ...@@ -54,7 +54,7 @@ typedef struct __TestCaller* TestCallerRef;/*downward compatible*/
struct __TestCaller { struct __TestCaller {
TestImplement* isa; TestImplement* isa;
char *name; const char *name;
void(*setUp)(void); void(*setUp)(void);
void(*tearDown)(void); void(*tearDown)(void);
int numberOfFixtuers; int numberOfFixtuers;
......
...@@ -44,7 +44,7 @@ typedef struct __TestCase* TestCaseRef;/*compatible embUnit1.0*/ ...@@ -44,7 +44,7 @@ typedef struct __TestCase* TestCaseRef;/*compatible embUnit1.0*/
struct __TestCase { struct __TestCase {
TestImplement* isa; TestImplement* isa;
char *name; const char *name;
void(*setUp)(void); void(*setUp)(void);
void(*tearDown)(void); void(*tearDown)(void);
void(*runTest)(void); void(*runTest)(void);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment