| Class | TC_MysqlTime |
| In: |
test.rb
|
| Parent: | Test::Unit::TestCase |
# File test.rb, line 1332
1332: def test_day()
1333: t = Mysql::Time.new
1334: assert_equal(23, t.day = 23)
1335: assert_equal(23, t.day)
1336: end
# File test.rb, line 1361
1361: def test_eql()
1362: t1 = Mysql::Time.new(2005,7,19,23,56,13)
1363: t2 = Mysql::Time.new(2005,7,19,23,56,13)
1364: assert_equal(t1, t2)
1365: end
# File test.rb, line 1338
1338: def test_hour()
1339: t = Mysql::Time.new
1340: assert_equal(15, t.hour = 15)
1341: assert_equal(15, t.hour)
1342: end
# File test.rb, line 1308
1308: def test_init()
1309: t = Mysql::Time.new
1310: assert_equal(0, t.year);
1311: assert_equal(0, t.month);
1312: assert_equal(0, t.day);
1313: assert_equal(0, t.hour);
1314: assert_equal(0, t.minute);
1315: assert_equal(0, t.second);
1316: assert_equal(false, t.neg);
1317: assert_equal(0, t.second_part);
1318: end
# File test.rb, line 1344
1344: def test_minute()
1345: t = Mysql::Time.new
1346: assert_equal(58, t.month = 58)
1347: assert_equal(58, t.month)
1348: end
# File test.rb, line 1326
1326: def test_month()
1327: t = Mysql::Time.new
1328: assert_equal(11, t.month = 11)
1329: assert_equal(11, t.month)
1330: end
# File test.rb, line 1350
1350: def test_second()
1351: t = Mysql::Time.new
1352: assert_equal(34, t.second = 34)
1353: assert_equal(34, t.second)
1354: end
# File test.rb, line 1356
1356: def test_tos()
1357: t = Mysql::Time.new(2005, 7, 19, 10, 15, 49)
1358: assert_equal("2005-07-19 10:15:49", t.to_s)
1359: end