| Class | TC_MysqlTime |
| In: |
test.rb
|
| Parent: | Test::Unit::TestCase |
# File test.rb, line 1324
1324: def test_day()
1325: t = Mysql::Time.new
1326: assert_equal(23, t.day = 23)
1327: assert_equal(23, t.day)
1328: end
# File test.rb, line 1353
1353: def test_eql()
1354: t1 = Mysql::Time.new(2005,7,19,23,56,13)
1355: t2 = Mysql::Time.new(2005,7,19,23,56,13)
1356: assert_equal(t1, t2)
1357: end
# File test.rb, line 1330
1330: def test_hour()
1331: t = Mysql::Time.new
1332: assert_equal(15, t.hour = 15)
1333: assert_equal(15, t.hour)
1334: end
# File test.rb, line 1300
1300: def test_init()
1301: t = Mysql::Time.new
1302: assert_equal(0, t.year);
1303: assert_equal(0, t.month);
1304: assert_equal(0, t.day);
1305: assert_equal(0, t.hour);
1306: assert_equal(0, t.minute);
1307: assert_equal(0, t.second);
1308: assert_equal(false, t.neg);
1309: assert_equal(0, t.second_part);
1310: end
# File test.rb, line 1336
1336: def test_minute()
1337: t = Mysql::Time.new
1338: assert_equal(58, t.month = 58)
1339: assert_equal(58, t.month)
1340: end
# File test.rb, line 1318
1318: def test_month()
1319: t = Mysql::Time.new
1320: assert_equal(11, t.month = 11)
1321: assert_equal(11, t.month)
1322: end
# File test.rb, line 1342
1342: def test_second()
1343: t = Mysql::Time.new
1344: assert_equal(34, t.second = 34)
1345: assert_equal(34, t.second)
1346: end
# File test.rb, line 1348
1348: def test_tos()
1349: t = Mysql::Time.new(2005, 7, 19, 10, 15, 49)
1350: assert_equal("2005-07-19 10:15:49", t.to_s)
1351: end