Documentation updates for hei_user_defines.hpp
Change-Id: I86e4f6fa2d26c6aa36e30a46823ff3f7b6742bfc
Signed-off-by: Zane Shelley <zshelle@us.ibm.com>
diff --git a/test/hei_user_defines.cpp b/test/hei_user_defines.cpp
deleted file mode 100644
index f6e39f0..0000000
--- a/test/hei_user_defines.cpp
+++ /dev/null
@@ -1,30 +0,0 @@
-#include <assert.h>
-#include <stdarg.h>
-#include <stdio.h>
-
-namespace libhei
-{
-
-void hei_inf(char* format, ...)
-{
- va_list args;
-
- printf("I> ");
- va_start(args, format);
- vprintf(format, args);
- va_end(args);
- printf("\n");
-}
-
-void hei_err(char* format, ...)
-{
- va_list args;
-
- printf("E> ");
- va_start(args, format);
- vprintf(format, args);
- va_end(args);
- printf("\n");
-}
-
-} // namespace libhei
diff --git a/test/meson.build b/test/meson.build
index 209bad3..642b827 100644
--- a/test/meson.build
+++ b/test/meson.build
@@ -3,7 +3,7 @@
# supporting files that need compiled/linked
test_src = ['../src/util/hei_bit_string.cpp',
- 'hei_user_defines.cpp']
+ 'sim_tracing.cpp']
# build g-test framework unit tests
gtests = [
diff --git a/test/sim_tracing.cpp b/test/sim_tracing.cpp
new file mode 100644
index 0000000..f3ac008
--- /dev/null
+++ b/test/sim_tracing.cpp
@@ -0,0 +1,29 @@
+#include <stdarg.h>
+#include <stdio.h>
+
+namespace libhei
+{
+
+// prints a single line to stdout
+void hei_inf(char* format, ...)
+{
+ va_list args;
+ fprintf(stdout, "I> ");
+ va_start(args, format);
+ vfprintf(stdout, format, args);
+ va_end(args);
+ fprintf(stdout, "\n");
+}
+
+// prints a single line to stderr
+void hei_err(char* format, ...)
+{
+ va_list args;
+ fprintf(stderr, "E> ");
+ va_start(args, format);
+ vfprintf(stderr, format, args);
+ va_end(args);
+ fprintf(stderr, "\n");
+}
+
+} // namespace libhei
diff --git a/test/simulator/meson.build b/test/simulator/meson.build
index ec5410f..590e381 100644
--- a/test/simulator/meson.build
+++ b/test/simulator/meson.build
@@ -1,12 +1,12 @@
# Simulator sources
-sim_libhei = [
+sim_src = [
'simulator.cpp',
- 'hei_user_interface.cpp',
- '../hei_user_defines.cpp'
+ 'sim_hardware_access.cpp',
+ '../sim_tracing.cpp'
]
# Test cases
-test_libhei = [
+test_src = [
'sample_test_case.cpp',
]
@@ -15,7 +15,7 @@
# Build simulator linked locally
if gtest.found()
test('simulator',
- executable('simulator', sim_libhei, test_libhei,
+ executable('simulator', sim_src, test_src,
dependencies : gtest,
link_with : libhei_static,
include_directories: incdir))
diff --git a/test/simulator/hei_user_interface.cpp b/test/simulator/sim_hardware_access.cpp
similarity index 100%
rename from test/simulator/hei_user_interface.cpp
rename to test/simulator/sim_hardware_access.cpp