1
0
mirror of https://github.com/ThrowTheSwitch/Unity.git synced 2026-01-25 01:11:36 +01:00

Add tests for printing numbers using a compile time replacement spy

If Unity core is compiled with UNITY_OUTPUT_CHAR = putcharSpy, these tests
  will run, otherwise they are ignored and print a message
 Includes an implementation of putcharSpy, which allows checking the I/O
  from Unity during a test. Follows closely from the Fixture spy
 Tricky macros determine if putcharSpy is injected
This commit is contained in:
jsalling
2015-12-20 15:56:15 -06:00
parent e966a079a4
commit a3d81dfa41
2 changed files with 117 additions and 0 deletions

View File

@@ -5,8 +5,11 @@
========================================== */
#include <setjmp.h>
#include <stdio.h>
#include "unity.h"
int putcharSpy(int c) {return putchar(c);} // include passthrough for linking tests
#define TEST_CASE(...)
#define EXPECT_ABORT_BEGIN \