summaryrefslogtreecommitdiffhomepage
path: root/mrbgems/mruby-time/test
AgeCommit message (Collapse)Author
2021-04-24Skip tests that use `Float` inside; ref #5421Yukihiro "Matz" Matsumoto
2019-07-31Fix UTC offset representation in `Time#to_s` on some environments; ref #4604KOBAYASHI Shuji
Use own implementation to calculate UTC offset on Visual Studio 2015 or earlier or MinGW because `strftime("%z")` on these environments does not conform C99.
2019-05-24Fix the order of "expected" and "actual" in `mruby-time` testKOBAYASHI Shuji
2019-05-14Refine `Time#(to_s|inspect)`KOBAYASHI Shuji
For the following reasons: - Ruby compatibility. - Add UTC offset (time zone informations was not included by #4433). - More readable. Example: Before this patch: p Time.gm(2003,4,5,6,7,8,9) #=> Sat Apr 5 06:07:08 2003 p Time.local(2013,10,28,16,27,48) #=> Mon Oct 28 16:27:48 2013 After this patch: p Time.gm(2003,4,5,6,7,8,9) #=> 2003-04-05 06:07:08 UTC p Time.local(2013,10,28,16,27,48) #=> 2013-10-28 16:27:48 +0900 Implementation: I use `strftime(3)` because UTC offset can be added and program size become smaller than the other implementations (using `sprintf(3)`, self conversion etc) in my environment.
2019-05-13Fix `Time#(asctime|ctime)` according to ISO RubyKOBAYASHI Shuji
- A leading charactor for day is space. - Time zone does not included. Before this patch: Time.gm(1982,3,4,5,6,7).asctime #=> "Thu Mar 04 05:06:07 UTC 1982" After this patch: Time.gm(1982,3,4,5,6,7).asctime #=> "Thu Mar 4 05:06:07 1982"
2019-05-12Fix missing assertions in `mruby-time` testKOBAYASHI Shuji
2018-01-24`Time.new(1969,12,31,23,59,59)` may or may not faile; ref #3932Yukihiro "Matz" Matsumoto
On some platform and timezone it is a valid time spec.
2018-01-21mruby-time: remove test case less than Dec 31 23:59:58 1969ken-mu
2018-01-20mruby-time: Fix mruby specific timegm() cannot return minusken-mu
2017-03-28Fix infinity loopksss
And some cases should raise FloatDomainError
2016-11-26removed failing test for Time#initialize; ref #3295Yukihiro "Matz" Matsumoto
2016-11-25Fix null pointer dereference in mrb_time_initializeBouke van der Bijl
Reported by https://hackerone.com/raydot
2015-06-15Rounding errors could make time_alloc impreciseLukas Joeressen
2014-06-15Test all ISO defined classes direct superclass except `Object` class.take_cheeze
Move mrbgems ISO direct superclass test to `superclass.rb`. Skips test if class isn't defined. Close #2332.
2014-05-07Remove `Time` defined check in test.take_cheeze
2014-05-05Implement day of week methods.take_cheeze
2013-02-28s/mgem/mrbgem/Yuichiro MASUI