class TimeT issubclassof TestDriver functions public tests : () -> seqof TestCase
tests() ==
[ new TimeT06(), new TimeT05(), new TimeT04(), new TimeT03(), new TimeT02(), new TimeT01()
]; end TimeT ----------------------------------------------------------
class TimeT01 issubclassof TestCase, CalendarDefinition operations protected test: () ==> bool
test() == let cal = new JapaneseCalendar(),
d1 = cal.getDateFrom_yyyy_mm_dd(2003, 7, 30),
d3 = cal.getDateFrom_yyyy_mm_dd(2003, 8, 15),
t1 = newTime(cal, 2003, 7, 30, 14, 29, 30, 20),
t2 = newTime(cal, 2003, 8, 1) ,
t3 = newTime(d3) in return
t1.getDate().EQ(d1) and
t1.Time2IntProduct(t1.getTime()) = mk_(14, 29, 30, 20) and
mk_(t1.hour(), t1.minute(), t1.second()) = mk_(14, 29, 30) and
mk_(t2.Year(), t2.Month(), t2.day()) = mk_(2003, 8, 1) and
t2.getTime() = t2.IntProduct2TimeMillieSeconds(0, 0, 0, 0) and
t3.getDate().EQ(d3) and
t3.getTime() = t2.IntProduct2TimeMillieSeconds(0, 0, 0, 0)
; protected setUp: () ==> ()
setUp() == TestName := "Time01:¥tTest of constructor."; protected tearDown: () ==> ()
tearDown() == return; end TimeT01 ----------------------------------------------------------
class TimeT02 issubclassof TestCase, CalendarDefinition operations protected test: () ==> bool
test() == let cal = new JapaneseCalendar(),
t1 = newTime(cal, 2003, 7, 30, 14, 29, 30, 0),
t2 = newTime(cal, 2003, 8, 1) ,
t4 = newTime(cal, 2003, 7, 30, 14, 29, 31, 0),
t5 = newTime(cal, 2003, 7, 30, 14, 29, 31, 0),
t6 = t1 in return
t1.LT(t2) and
t1.LT(t4) and
t1.LE(t2) and
t1.LE(t4) and
t2.GT(t1) and
t4.GT(t1) and
t2.GE(t1) and
t4.GE(t1) and
t4.EQ(t5) and
t4.NE(t1) and
t4 <> t5 and
t1 = t6
; protected setUp: () ==> ()
setUp() == TestName := "TimeT02:\tATime comparing."; protected tearDown: () ==> ()
tearDown() == return; end TimeT02 ----------------------------------------------------------
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.