class SBCalendarT issubclassof TestDriver functions public tests : () -> seqof TestCase
tests () ==
[ new SBCalendarT06(), new SBCalendarT05(), new SBCalendarT04(), new SBCalendarT03(), new SBCalendarT02(), new SBCalendarT01()
]; end SBCalendarT
class SBCalendarT01 issubclassof TestCase operations protected test: () ==> bool
test() == let c = new SBCalendar() in
(
c.setTodayOnBusiness(c.getDateFrom_yyyy_mm_dd(2001,9,12));
c.setSystemTime(newTime(c, 2003, 10, 23, 13, 12, 34, 567)); return
( --c.maxDate().EQ(c.getDateFrom_yyyy_mm_dd(9999,12,31)) and --c.maxDate().date2Str = c.dateの最大値 and
c.todayOnBusiness().EQ(c.getDateFrom_yyyy_mm_dd(2001,9,12)) and
c.isDateNil(nil) = trueand --c.isDateNil(c.maxDate()) = true and
c.isDateNil(c.todayOnBusiness()) = falseand
c.systemDate().EQ(c.today()) and
c.systemTime().EQ(newTime(c, 2003, 10, 23, 13, 12, 34, 567))
)
)
; protected setUp: () ==> ()
setUp() == TestName := "SBCalendarT01:\tTest maxDate and date is nil."; protected tearDown: () ==> ()
tearDown() == return; end SBCalendarT01
class SBCalendarT03 issubclassof TestCase operations protected test: () ==> bool
test() == let c = new SBCalendar() in
(
c.setTodayOnBusiness(c.getDateFrom_yyyy_mm_dd(2001,9,12)); return
(
c.getExerciseDate("200111").EQ(c.getDateFrom_yyyy_mm_dd(2001,11,9)) and
c.getExerciseDate("200109").EQ(c.getDateFrom_yyyy_mm_dd(2001,9,14)) and
c.isCorrectContractMonth("200206") = trueand
c.isCorrectContractMonth("200206.01") = falseand
c.isCorrectContractMonth("Shin Sahara") = false
)
)
; protected setUp: () ==> ()
setUp() == TestName := "SBCalendarT03:\tTest validity checking of contract month and getting execution date."; protected tearDown: () ==> ()
tearDown() == return; end SBCalendarT03
class SBCalendarT04 issubclassof TestCase operations protected test: () ==> bool
test() == let c = new SBCalendar(),
d0929 = c.getDateFrom_yyyy_mm_dd(2001, 9, 29),
d0104 = c.getDateFrom_yyyy_mm_dd(20021, 1, 4) in
(
c.setTodayOnCompany("007",d0104);
c.setTodayOnCompany("009",d0929); return
(
c.todayOnCompany("007") = d0104 and
c.todayOnCompany("009") = d0929
)
)
; protected setUp: () ==> ()
setUp() == TestName := "SBCalendarT04:\tTest of todayOnCompany"; protected tearDown: () ==> ()
tearDown() == return; end SBCalendarT04
class SBCalendarT05 issubclassof TestCase, CalendarDefinition operations protected test: () ==> bool
test() == let c = new SBCalendar() in return
c.todayOnBusiness().EQ(c.getDateFrom_yyyy_mm_dd(2003, 10, 24)) and
c.readFromFiletodayOnBusiness(homedir ^ "/temp/Today.txt").EQ(c.getDateFrom_yyyy_mm_dd(2001, 3, 1))
; protected setUp: () ==> ()
setUp() == TestName := "SBCalendarT05:\tTest todayOnBusiness from a file."; protected tearDown: () ==> ()
tearDown() == return; end SBCalendarT05
class SBCalendarT06 issubclassof TestCase operations protected test: () ==> bool
test() == let c = new SBCalendar(),
sDate = SBCalendar`getContractDate in return
sDate(c.getDateFrom_yyyy_mm_dd(2004, 1, 5)).EQ(c.getDateFrom_yyyy_mm_dd(2004, 7, 5)) and
sDate(c.getDateFrom_yyyy_mm_dd(2004, 1, 31)).EQ(c.getDateFrom_yyyy_mm_dd(2004, 7, 30)) and
sDate(c.getDateFrom_yyyy_mm_dd(2004, 2, 1)).EQ(c.getDateFrom_yyyy_mm_dd(2004, 7, 30)) and
sDate(c.getDateFrom_yyyy_mm_dd(2004, 2, 2)).EQ(c.getDateFrom_yyyy_mm_dd(2004, 8, 2)) and
sDate(c.getDateFrom_yyyy_mm_dd(2004, 2, 27)).EQ(c.getDateFrom_yyyy_mm_dd(2004, 8, 27)) and
sDate(c.getDateFrom_yyyy_mm_dd(2004, 3, 1)).EQ(c.getDateFrom_yyyy_mm_dd(2004, 9, 1)) and
sDate(c.getDateFrom_yyyy_mm_dd(2004, 3, 30)).EQ(c.getDateFrom_yyyy_mm_dd(2004, 9, 30)) and
sDate(c.getDateFrom_yyyy_mm_dd(2004, 3, 31)).EQ(c.getDateFrom_yyyy_mm_dd(2004, 9, 30)) and
sDate(c.getDateFrom_yyyy_mm_dd(2004, 4, 1)).EQ(c.getDateFrom_yyyy_mm_dd(2004, 10, 1)) and
sDate(c.getDateFrom_yyyy_mm_dd(2004, 4, 30)).EQ(c.getDateFrom_yyyy_mm_dd(2004, 10, 29)) and
sDate(c.getDateFrom_yyyy_mm_dd(2004, 5, 6)).EQ(c.getDateFrom_yyyy_mm_dd(2004, 11, 5)) and
sDate(c.getDateFrom_yyyy_mm_dd(2004, 5, 7)).EQ(c.getDateFrom_yyyy_mm_dd(2004, 11, 5)) and
sDate(c.getDateFrom_yyyy_mm_dd(2004, 5, 10)).EQ(c.getDateFrom_yyyy_mm_dd(2004, 11, 10)) and
sDate(c.getDateFrom_yyyy_mm_dd(2004, 6, 1)).EQ(c.getDateFrom_yyyy_mm_dd(2004, 12, 1)) and
sDate(c.getDateFrom_yyyy_mm_dd(2004, 6, 28)).EQ(c.getDateFrom_yyyy_mm_dd(2004, 12, 28)) and
sDate(c.getDateFrom_yyyy_mm_dd(2004, 6, 29)).EQ(c.getDateFrom_yyyy_mm_dd(2004, 12, 28)) and
sDate(c.getDateFrom_yyyy_mm_dd(2004, 6, 30)).EQ(c.getDateFrom_yyyy_mm_dd(2004, 12, 28)) and
sDate(c.getDateFrom_yyyy_mm_dd(2004, 7, 1)).EQ(c.getDateFrom_yyyy_mm_dd(2004, 12, 28)) and
sDate(c.getDateFrom_yyyy_mm_dd(2004, 7, 2)).EQ(c.getDateFrom_yyyy_mm_dd(2004, 12, 28)) and
sDate(c.getDateFrom_yyyy_mm_dd(2004, 7, 5)).EQ(c.getDateFrom_yyyy_mm_dd(2005, 1, 5)) and
sDate(c.getDateFrom_yyyy_mm_dd(2004, 7, 30)).EQ(c.getDateFrom_yyyy_mm_dd(2005, 1, 28)) and
sDate(c.getDateFrom_yyyy_mm_dd(2003, 8, 2)).EQ(c.getDateFrom_yyyy_mm_dd(2004, 2, 2)) and
sDate(c.getDateFrom_yyyy_mm_dd(2003, 8, 28)).EQ(c.getDateFrom_yyyy_mm_dd(2004, 2, 27)) and
sDate(c.getDateFrom_yyyy_mm_dd(2003, 8, 29)).EQ(c.getDateFrom_yyyy_mm_dd(2004, 2, 27)) and
sDate(c.getDateFrom_yyyy_mm_dd(2003, 9, 1)).EQ(c.getDateFrom_yyyy_mm_dd(2004, 3, 1)) and
sDate(c.getDateFrom_yyyy_mm_dd(2003, 9, 30)).EQ(c.getDateFrom_yyyy_mm_dd(2004, 3, 30)) and
sDate(c.getDateFrom_yyyy_mm_dd(2003, 10, 1)).EQ(c.getDateFrom_yyyy_mm_dd(2004, 4, 1)) and
sDate(c.getDateFrom_yyyy_mm_dd(2003, 10, 29)).EQ(c.getDateFrom_yyyy_mm_dd(2004, 4, 28)) and
sDate(c.getDateFrom_yyyy_mm_dd(2003, 11, 1)).EQ(c.getDateFrom_yyyy_mm_dd(2004, 4, 30)) and
sDate(c.getDateFrom_yyyy_mm_dd(2003, 11, 30)).EQ(c.getDateFrom_yyyy_mm_dd(2004, 5, 28)) and
sDate(c.getDateFrom_yyyy_mm_dd(2003, 12, 1)).EQ(c.getDateFrom_yyyy_mm_dd(2004, 6, 1)) and
sDate(c.getDateFrom_yyyy_mm_dd(2003, 12, 26)).EQ(c.getDateFrom_yyyy_mm_dd(2004, 6, 25))
; protected setUp: () ==> ()
setUp() == TestName := "SBCalendarT06:\tGetting contract date of margin trading."; protected tearDown: () ==> ()
tearDown() == return; end SBCalendarT06
Messung V0.5 in Prozent
¤ 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.0.1Bemerkung:
(vorverarbeitet am 2026-06-10)
¤
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.