aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorNicolas Catania <niko@google.com>2010-02-04 10:10:46 -0800
committerNicolas Catania <niko@google.com>2010-02-04 10:20:29 -0800
commit44d38f3d1ae0fd02030e259c4f93a265f91e96fc (patch)
treeb1499d3a6cfaab3d5a14f588c166e8d4140f37f5 /tests
parente5b7af0c3c5af401b46d34987cbd8a65f45454de (diff)
downloadastl-44d38f3d1ae0fd02030e259c4f93a265f91e96fc.tar.gz
Added support to output int, void* and std::string.
Diffstat (limited to 'tests')
-rw-r--r--tests/test_iostream.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/test_iostream.cpp b/tests/test_iostream.cpp
index a3437a2..53fbb60 100644
--- a/tests/test_iostream.cpp
+++ b/tests/test_iostream.cpp
@@ -32,6 +32,7 @@
#error "Wrong header included!!"
#endif
#include "common.h"
+#include <string>
namespace android {
@@ -77,6 +78,16 @@ bool testManip() {
return true;
}
+bool testOutputFormat() {
+ using std::endl;
+ using std::cout;
+ cout << endl << "Int: " << 10 << endl;
+ cout << "Negative int: " << -10 << endl;
+ cout << "Unsigned int: " << 0xffffffff << endl;
+ cout << "Void *: " << static_cast<void*>(&std::cout) << endl;
+ cout << "string: " << std::string("hello world") << endl;
+ return true;
+}
} // namespace android
int main(int argc, char **argv){
@@ -84,5 +95,6 @@ int main(int argc, char **argv){
FAIL_UNLESS(testOstream);
FAIL_UNLESS(testCoutCerr);
FAIL_UNLESS(testManip);
+ FAIL_UNLESS(testOutputFormat);
return kPassed;
}