-
-
Save RespiteSage/dfaca81b929ed89d94694b0898ef6172 to your computer and use it in GitHub Desktop.
Crystal 1.1.1 raise arithmetic overflow
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require "spec" | |
describe "Something" do | |
it "raises" do | |
expect_raises(Exception, "Invalid t!") do | |
raise "Oops!" | |
end | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
E | |
Failures: | |
1) Something raises | |
Arithmetic overflow (OverflowError) | |
from Exception::CallStack::unwind:Array(Pointer(Void)) | |
from Exception::CallStack#initialize:Array(Pointer(Void)) | |
from Exception::CallStack::new:Exception::CallStack | |
from raise<OverflowError>:NoReturn | |
from ??? | |
from Crystal::DWARF::LineNumbers#read_opcodes<Crystal::DWARF::LineNumbers::Sequence>:Nil | |
from Crystal::DWARF::LineNumbers#decode_sequences<(UInt32 | UInt64)>:Nil | |
from Crystal::DWARF::LineNumbers#initialize<IO::FileDescriptor+, (UInt32 | UInt64), UInt64>:Nil | |
from Crystal::DWARF::LineNumbers::new<IO::FileDescriptor+, (UInt32 | UInt64), UInt64>:Crystal::DWARF::LineNumbers | |
from Exception::CallStack::read_dwarf_sections<UInt64>:(Array(Tuple(UInt64, UInt64, String)) | Nil) | |
from ~procProc(Pointer(LibC::DlPhdrInfo), UInt64, Pointer(Void), Int32) | |
from dl_iterate_phdr | |
from Exception::CallStack::load_dwarf_impl:Nil | |
from Exception::CallStack::load_dwarf:(Int32 | Nil) | |
from Exception::CallStack::decode_line_number<UInt64>:Tuple(String, Int32, Int32) | |
from Exception::CallStack#decode_backtrace:Array(String) | |
from Exception::CallStack#printable_backtrace:Array(String) | |
from Exception+ | |
from Exception+ | |
from ~procProc(Nil) | |
from Spec::Example#internal_run<Time::Span, Proc(Nil)>:(Array(Spec::Result) | Nil) | |
from Spec::Example#run:Nil | |
from Spec::ExampleGroup | |
from Spec::ExampleGroup#run:Nil | |
from Spec::RootContext | |
from Spec::RootContext#run:Nil | |
from ~procProc(Int32, (Exception | Nil), Nil) | |
from Crystal::AtExitHandlers::run<Int32, (Exception+ | Nil)>:Int32 | |
from Crystal::main<Int32, Pointer(Pointer(UInt8))>:Int32 | |
from main | |
from __libc_start_main | |
from _start | |
from ??? | |
Finished in 478 microseconds | |
1 examples, 0 failures, 1 errors, 0 pending | |
Failed examples: | |
crystal spec not_working.cr:4 # Something raises |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require "spec" | |
describe "Something" do | |
it "raises" do | |
expect_raises(Exception, "Invalid t!") do | |
raise "Invalid t!" | |
end | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
. | |
Finished in 126 microseconds | |
1 examples, 0 failures, 0 errors, 0 pending |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment