瀏覽代碼

Merge branch 'develop' into feature/#64-add-gcc-printf-hints

Strobel, Stefan | Friedrich Lütze GmbH 9 月之前
父節點
當前提交
25feee0480
共有 3 個文件被更改,包括 2293 次插入1182 次删除
  1. 7 7
      makefile
  2. 2282 1171
      test/framework/catch.hpp
  3. 4 4
      test/unittest/shellmatta_utils/test_utils_writeEcho.cpp

+ 7 - 7
makefile

@@ -148,32 +148,32 @@ $(TARGET): $(OBJ)
 	
 $(COBJ):
 	- @mkdir -p $(@D)
-	@$(CC) -c $(CFLAGS)  $(DEPEND) -o $@  $(subst $(OBJ_DIR), ,$(@:%.o=%.c))
+	@$(CC) -c $(CFLAGS) $(DEPEND) -o $(@:%.o=%.d) $(subst $(OBJ_DIR), ,$(@:%.o=%.c))
 	$(CC) -c $(CFLAGS) -o $@  $(subst $(OBJ_DIR), ,$(@:%.o=%.c))
 
 $(EXAMPLE_COBJ):
 	- @mkdir -p $(@D)
-	@$(CC) -c $(CFLAGS) $(DEPEND) -o $@  $(subst $(OBJ_DIR), ,$(@:%.o=%.c))
+	@$(CC) -c $(CFLAGS) $(DEPEND) -o $(@:%.o=%.d) $(subst $(OBJ_DIR), ,$(@:%.o=%.c))
 	$(CC) -c $(CFLAGS) -o $@  $(subst $(OBJ_DIR), ,$(@:%.o=%.c))
 
 $(UNITTEST_CPPOBJ):
 	- @mkdir -p $(@D)
-	@$(CPP) -c $(TESTFLAGS) $(DEPEND) -o $@  $(subst $(UNITTEST_OBJ_DIR), ,$(@:%.o=%.cpp))
-	$(CPP) -c $(TESTFLAGS) -o $@  $(subst $(UNITTEST_OBJ_DIR), ,$(@:%.o=%.cpp))
+	@$(CPP) -c $(TESTFLAGS) $(DEPEND) -o $(@:%.o=%.d) $(subst $(UNITTEST_OBJ_DIR), ,$(@:%.o=%.cpp))
+	$(CPP) -c $(TESTFLAGS) -o $@ $(subst $(UNITTEST_OBJ_DIR), ,$(@:%.o=%.cpp))
 
 $(INTEGRATIONTEST_CPPOBJ):
 	- @mkdir -p $(@D)
-	@$(CPP) -c $(TESTFLAGS) $(DEPEND) -o $@  $(subst $(INTEGRATIONTEST_CPP_OBJ_DIR), ,$(@:%.o=%.cpp))
+	@$(CPP) -c $(TESTFLAGS) $(DEPEND) -o $(@:%.o=%.d) $(subst $(INTEGRATIONTEST_CPP_OBJ_DIR), ,$(@:%.o=%.cpp))
 	$(CPP) -c $(TESTFLAGS) -o $@  $(subst $(INTEGRATIONTEST_CPP_OBJ_DIR), ,$(@:%.o=%.cpp))
 
 $(INTEGRATIONTEST_COBJ):
 	- @mkdir -p $(@D)
-	@$(CC) -c $(TESTFLAGS) $(DEPEND) -o $@  $(subst $(INTEGRATIONTEST_C_OBJ_DIR), ,$(@:%.o=%.c))
+	@$(CC) -c $(TESTFLAGS) $(DEPEND) -o $(@:%.o=%.d) $(subst $(INTEGRATIONTEST_C_OBJ_DIR), ,$(@:%.o=%.c))
 	$(CC) -c $(TESTFLAGS) -o $@  $(subst $(INTEGRATIONTEST_C_OBJ_DIR), ,$(@:%.o=%.c))
 
 %.o: %.cpp
 	- @mkdir -p $(@D)
-	@$(CPP) -c $(CFLAGS) $(DEPEND) -o $@  $(subst $(OBJ_DIR), ,$(@:%.o=%.c))
+	@$(CPP) -c $(CFLAGS) $(DEPEND) -o $(@:%.o=%.d) $(subst $(OBJ_DIR), ,$(@:%.o=%.c))
 	$(CPP) -c $(CFLAGS) -o $@  $<
 
 -include $(DEPS)

File diff suppressed because it is too large
+ 2282 - 1171
test/framework/catch.hpp


+ 4 - 4
test/unittest/shellmatta_utils/test_utils_writeEcho.cpp

@@ -17,8 +17,8 @@ static shellmatta_retCode_t writeFct(const char* data, uint32_t length)
 TEST_CASE( "shellmatta_writeEcho echo enabled" ) {
 
     shellmatta_instance_t inst;
-    char buffer[20];
-    char dummyData[29];
+    char buffer[20] = {0};
+    char dummyData[29] = {0};
 
     inst.buffer = buffer;
     inst.bufferSize = 20;
@@ -42,8 +42,8 @@ TEST_CASE( "shellmatta_writeEcho echo enabled" ) {
 TEST_CASE( "shellmatta_writeEcho echo disabled" ) {
 
     shellmatta_instance_t inst;
-    char buffer[20];
-    char dummyData[29];
+    char buffer[20] = {0};
+    char dummyData[29] = {0};
 
     inst.buffer = buffer;
     inst.bufferSize = 20;