OSDN Git Service

[gcc] io_test.cpp Add.
authortomoaki <tomoaki@edge-vpc-debian6.yahagi>
Sat, 23 Jun 2012 19:18:48 +0000 (04:18 +0900)
committertomoaki <tomoaki@edge-vpc-debian6.yahagi>
Sat, 23 Jun 2012 19:18:48 +0000 (04:18 +0900)
roast/test/linux_test2/Makefile
roast/test/linux_test2/io_test.cpp [new file with mode: 0644]

index 111faeb..745d1c9 100755 (executable)
@@ -25,6 +25,8 @@ process_test:
        $(COMP) process_test.cpp 
 socket_test:
        $(COMP) socket_test.cpp 
+io:
+       $(COMP) io_test.cpp 
 test:
        $(COMP) test.cpp 
 
diff --git a/roast/test/linux_test2/io_test.cpp b/roast/test/linux_test2/io_test.cpp
new file mode 100644 (file)
index 0000000..60357ea
--- /dev/null
@@ -0,0 +1,18 @@
+#include "roast/io/stdio.hpp"
+
+using namespace roast;
+
+int main()
+{
+       io::wfile f("hoge");
+       f.write("testtest");
+
+       io::wfile f2 = f;
+       f2.write("!!");
+       printf("%d\n", f2.pos());
+
+       io::stdout_.write("testtest\n");
+
+       return 0;
+}
+