summaryrefslogtreecommitdiff
path: root/src/systemc/tests/systemc/datatypes/int/string_conversion/test03/test03.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/systemc/tests/systemc/datatypes/int/string_conversion/test03/test03.cpp')
-rw-r--r--src/systemc/tests/systemc/datatypes/int/string_conversion/test03/test03.cpp43
1 files changed, 43 insertions, 0 deletions
diff --git a/src/systemc/tests/systemc/datatypes/int/string_conversion/test03/test03.cpp b/src/systemc/tests/systemc/datatypes/int/string_conversion/test03/test03.cpp
new file mode 100644
index 000000000..a075ba525
--- /dev/null
+++ b/src/systemc/tests/systemc/datatypes/int/string_conversion/test03/test03.cpp
@@ -0,0 +1,43 @@
+#include "systemc.h"
+
+inline void flags_value()
+{
+ ios::fmtflags flags = cout.flags();
+ cout << hex << flags << dec << endl;
+ if ( sc_io_show_base(cout) ) cout << "showbase" << endl;
+}
+
+#define TEST(BASE) \
+{ \
+ BASE x; \
+ cout << endl << #BASE << endl; \
+ for ( i = 0; i < 256; i++ ) \
+ { \
+ x = i; \
+ cout << " "; \
+ cout << std::noshowbase; \
+ cout << dec << " d: " << x; \
+ cout << oct << " o: " << x; \
+ cout << hex << " x: " << x; \
+ cout << std::showbase; \
+ cout << dec << " d: " << x; \
+ cout << oct << " o: " << x; \
+ cout << hex << " x: " << x; \
+ cout << endl; \
+ } \
+}
+int sc_main(int argc, char* argv[])
+{
+ int i;
+ sc_biguint<8> x;
+
+ TEST(sc_bigint<8>)
+ TEST(sc_biguint<8>)
+ TEST(sc_int<8>)
+ TEST(sc_uint<8>)
+ TEST(sc_lv<8>)
+ TEST(sc_bv<8>)
+ cerr << "Program completed" << endl;
+
+ return 0;
+}