summaryrefslogtreecommitdiff
path: root/src/unittest
diff options
context:
space:
mode:
Diffstat (limited to 'src/unittest')
-rw-r--r--src/unittest/Makefile28
-rw-r--r--src/unittest/cprintftest.cc4
2 files changed, 15 insertions, 17 deletions
diff --git a/src/unittest/Makefile b/src/unittest/Makefile
index 1f0584066..e22b80b48 100644
--- a/src/unittest/Makefile
+++ b/src/unittest/Makefile
@@ -1,4 +1,4 @@
-# Copyright (c) 2006 The Regents of The University of Michigan
+# Copyright (c) 2006-2007 The Regents of The University of Michigan
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
@@ -47,48 +47,48 @@ base/traceflags.cc base/traceflags.hh: $(SRCDIR)/base/traceflags.py
cd base; \
$(PYTHON) $<
-bitvectest: test/bitvectest.cc
+bitvectest: unittest/bitvectest.cc
$(CXX) $(CCFLAGS) -o $@ $^
-circletest: test/circletest.cc base/circlebuf.cc
+circletest: unittest/circletest.cc base/circlebuf.cc
$(CXX) $(CCFLAGS) -o $@ $^
-cprintftest: test/cprintftest.cc base/cprintf.cc
+cprintftest: unittest/cprintftest.cc base/cprintf.cc
$(CXX) $(CCFLAGS) -o $@ $^
-initest: test/initest.cc base/str.cc base/inifile.cc base/cprintf.cc
+initest: unittest/initest.cc base/str.cc base/inifile.cc base/cprintf.cc
$(CXX) $(CCFLAGS) -o $@ $^
-lrutest: test/lru_test.cc
+lrutest: unittest/lru_test.cc
$(CXX) $(CCFLAGS) -o $@ $^
-nmtest: test/nmtest.cc base/output.cc base/hostinfo.cc base/cprintf.cc base/misc.cc base/loader/object_file.cc base/loader/symtab.cc base/misc.cc base/str.cc base/loader/aout_object.cc base/loader/ecoff_object.cc base/loader/elf_object.cc
+nmtest: unittest/nmtest.cc base/output.cc base/hostinfo.cc base/cprintf.cc base/misc.cc base/loader/object_file.cc base/loader/symtab.cc base/misc.cc base/str.cc base/loader/aout_object.cc base/loader/ecoff_object.cc base/loader/elf_object.cc
$(CXX) $(CCFLAGS) -I/n/ziff/z/binkertn/build/work/ALPHA_FS -lelf -o $@ $^
-offtest: test/offtest.cc
+offtest: unittest/offtest.cc
$(CXX) $(CCFLAGS) -o $@ $^
-rangetest: test/rangetest.cc base/range.cc base/str.cc
+rangetest: unittest/rangetest.cc base/range.cc base/str.cc
$(CXX) $(CCFLAGS) -o $@ $^
STATTEST+= base/cprintf.cc base/hostinfo.cc base/misc.cc base/mysql.cc
STATTEST+= base/python.cc base/str.cc base/time.cc
STATTEST+= base/statistics.cc base/stats/mysql.cc base/stats/python.cc
STATTEST+= base/stats/statdb.cc base/stats/text.cc base/stats/visit.cc
-STATTEST+= test/stattest.cc
+STATTEST+= unittest/stattest.cc
stattest: $(STATTEST)
$(CXX) $(CCFLAGS) $(MYSQL) -o $@ $^
-strnumtest: test/strnumtest.cc base/str.cc
+strnumtest: unittest/strnumtest.cc base/str.cc
$(CXX) $(CCFLAGS) -o $@ $^
-symtest: test/symtest.cc base/misc.cc base/symtab.cc base/str.cc
+symtest: unittest/symtest.cc base/misc.cc base/symtab.cc base/str.cc
$(CXX) $(CCFLAGS) -o $@ $^
-tokentest: test/tokentest.cc base/str.cc
+tokentest: unittest/tokentest.cc base/str.cc
$(CXX) $(CCFLAGS) -o $@ $^
-TRACE+=test/tracetest.cc base/trace.cc base/trace_flags.cc base/cprintf.cc
+TRACE+=unittest/tracetest.cc base/trace.cc base/trace_flags.cc base/cprintf.cc
TRACE+=base/str.cc base/misc.cc
tracetest: $(TRACE)
$(CXX) $(CCFLAGS) -o $@ $^
diff --git a/src/unittest/cprintftest.cc b/src/unittest/cprintftest.cc
index 9c3eb0cd6..a454be05e 100644
--- a/src/unittest/cprintftest.cc
+++ b/src/unittest/cprintftest.cc
@@ -43,13 +43,11 @@ main()
char foo[9];
cprintf("%s\n", foo);
+ cprintf("%d\n", 'A');
cprintf("%shits%%s + %smisses%%s\n", "test", "test");
cprintf("%%s%-10s %c he went home \'\"%d %#o %#x %1.5f %1.2E\n",
"hello", 'A', 1, 0xff, 0xfffffffffffffULL, 3.141592653589, 1.1e10);
- cout << cformat("%s %#x %s\n") << "hello" << 0 << "foo 0\n";
- cerr << cformat("%s %#x\n") << "hello" << 1 << "foo 1\n";
-
cprintf("another test\n");
stringstream buffer;