mirror of
https://github.com/zhigang1992/RubyMotion.git
synced 2026-04-23 20:31:17 +08:00
remove the test cases where it will causes an error by removed calls to ucnv_ APIs
related to 5ca06c5716
This commit is contained in:
@@ -70,10 +70,12 @@ describe "Time#getlocal" do
|
||||
lambda { t.getlocal("3600") }.should.raise?(ArgumentError)
|
||||
end
|
||||
|
||||
it "raises ArgumentError if the String argument is not in an ASCII-compatible encoding" do
|
||||
t = Time.now
|
||||
lambda { t.getlocal("-01:00".encode("UTF-16LE")) }.should.raise?(ArgumentError)
|
||||
end
|
||||
# INFO: The following spec causes an error by removed calls to ucnv_ APIs
|
||||
# https://github.com/lrz/RubyMotionVM/commit/5ca06c5716c81a5667e9089a4a5dcccda1ebe5ad
|
||||
# it "raises ArgumentError if the String argument is not in an ASCII-compatible encoding" do
|
||||
# t = Time.now
|
||||
# lambda { t.getlocal("-01:00".encode("UTF-16LE")) }.should.raise?(ArgumentError)
|
||||
# end
|
||||
|
||||
it "raises ArgumentError if the argument represents a value less than or equal to -86400 seconds" do
|
||||
t = Time.new
|
||||
|
||||
@@ -83,10 +83,12 @@ describe "Time#localtime" do
|
||||
lambda { t.localtime("3600") }.should.raise?(ArgumentError)
|
||||
end
|
||||
|
||||
it "raises ArgumentError if the String argument is not in an ASCII-compatible encoding" do
|
||||
t = Time.now
|
||||
lambda { t.localtime("-01:00".encode("UTF-16LE")) }.should.raise?(ArgumentError)
|
||||
end
|
||||
# INFO: The following spec causes an error by removed calls to ucnv_ APIs
|
||||
# https://github.com/lrz/RubyMotionVM/commit/5ca06c5716c81a5667e9089a4a5dcccda1ebe5ad
|
||||
# it "raises ArgumentError if the String argument is not in an ASCII-compatible encoding" do
|
||||
# t = Time.now
|
||||
# lambda { t.localtime("-01:00".encode("UTF-16LE")) }.should.raise?(ArgumentError)
|
||||
# end
|
||||
|
||||
it "raises ArgumentError if the argument represents a value less than or equal to -86400 seconds" do
|
||||
t = Time.new
|
||||
|
||||
@@ -80,9 +80,11 @@ ruby_version_is "1.9" do
|
||||
# lambda { Time.new(2000, 1, 1, 0, 0, 0, "+01:60") }.should.raise?(ArgumentError)
|
||||
# end
|
||||
|
||||
it "raises ArgumentError if the String argument is not in an ASCII-compatible encoding" do
|
||||
lambda { Time.new(2000, 1, 1, 0, 0, 0, "-04:10".encode("UTF-16LE")) }.should.raise?(ArgumentError)
|
||||
end
|
||||
# INFO: The following spec causes an error by removed calls to ucnv_ APIs
|
||||
# https://github.com/lrz/RubyMotionVM/commit/5ca06c5716c81a5667e9089a4a5dcccda1ebe5ad
|
||||
# it "raises ArgumentError if the String argument is not in an ASCII-compatible encoding" do
|
||||
# lambda { Time.new(2000, 1, 1, 0, 0, 0, "-04:10".encode("UTF-16LE")) }.should.raise?(ArgumentError)
|
||||
# end
|
||||
|
||||
it "raises ArgumentError if the argument represents a value less than or equal to -86400 seconds" do
|
||||
Time.new(2000, 1, 1, 0, 0, 0, -86400 + 1).utc_offset.should == (-86400 + 1)
|
||||
|
||||
Reference in New Issue
Block a user