summaryrefslogtreecommitdiffhomepage
path: root/test
diff options
context:
space:
mode:
authorDaniel Bovensiepen <[email protected]>2012-05-14 20:22:20 +0800
committerDaniel Bovensiepen <[email protected]>2012-05-14 20:22:20 +0800
commitc82a518ee1df250a03abb82aa58a1bfd2c04cfc3 (patch)
treea29397364f5c6f05b2f1bdd24af5f13a6472a6f7 /test
parentc8c0ef85bcb49adb2296169f6098a18a251d6f07 (diff)
downloadmruby-c82a518ee1df250a03abb82aa58a1bfd2c04cfc3.tar.gz
mruby-c82a518ee1df250a03abb82aa58a1bfd2c04cfc3.zip
removed.. content is now in time.rb
Diffstat (limited to 'test')
-rw-r--r--test/test_time.rb48
1 files changed, 0 insertions, 48 deletions
diff --git a/test/test_time.rb b/test/test_time.rb
deleted file mode 100644
index ea6e98696..000000000
--- a/test/test_time.rb
+++ /dev/null
@@ -1,48 +0,0 @@
-$ok = 0
-$failed = 0
-$ftest = []
-
-def assert(str = "Assertion failed")
- if(!yield)
- $ftest.push(str)
- $failed += 1
- print "F"
- else
- $ok += 1
- print "."
- end
-end
-
-def report()
- print "\n"
- $ftest.each do |str|
- puts("Test Failed: #{str}");
- end
- $total = $ok + $failed
- puts "Ran #{$total} tests: #{$ok} OK and #{$failed} failed."
-end
-
-doom = Time.gm(2012, 12, 23)
-assert("Time.gm") { doom }
-assert("gm year") { doom.year == 2012 }
-assert("gm month") { doom.month == 12 }
-assert("gm day") { doom.mday == 23 }
-
-t0 = Time.new
-assert("Can create time.") { t0 }
-
-t1 = Time.at(1300000000.0).utc
-assert("asctime") { t1.asctime == "Sun Mar 13 07:06:40 UTC 2011" }
-assert("usec") { t1.usec == 0 }
-assert("to_i") { t1.to_i == 1300000000 }
-assert("to_f") { t1.to_f == 1300000000.0 }
-assert("utc?") { t1.utc? }
-assert("zone") { t1.zone == "UTC" }
-assert("wday") { t1.wday == 0 }
-assert("yday") { t1.yday == 71 }
-assert("year") { t1.year == 2011 }
-
-t2 = Time.at(7.0e6)
-assert("initialize_copy") { t2.clone == t2 }
-
-report()