Sha256: 99e047e081a068711c3eb5a5993f6f23a20b674d1a35049896af6e6b99e4d465

Contents?: true

Size: 804 Bytes

Versions: 13

Compression:

Stored size: 804 Bytes

Contents

# -*- coding: utf-8 -*-


require_relative 'helper'


class TestException < Test::Unit::TestCase

  include Rucy::Tester

  def test_raise_ruby_exception()
    assert_raise(StandardError) {raise_ruby_exception}
  end

  def test_raise_in_eval()
    assert_raise(RuntimeError) {raise_in_eval}
  end

  def test_throw_std_exception()
    assert_raise(Rucy::NativeError) {throw_std_exception}
  end

  def test_throw_std_runtime_error()
    assert_raise(Rucy::NativeError) {throw_std_runtime_error}
  end

  def test_throw_custom_exception()
    assert_raise(Rucy::NativeError) {throw_custom_exception}
  end

  def test_throw_std_string()
    assert_raise(Rucy::NativeError) {throw_std_string}
  end

  def test_throw_cstring()
    assert_raise(Rucy::NativeError) {throw_cstring}
  end

end# TestException

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
rucy-0.1.34 test/test_exception.rb
rucy-0.1.33 test/test_exception.rb
rucy-0.1.32 test/test_exception.rb
rucy-0.1.31 test/test_exception.rb
rucy-0.1.30 test/test_exception.rb
rucy-0.1.29 test/test_exception.rb
rucy-0.1.28 test/test_exception.rb
rucy-0.1.27 test/test_exception.rb
rucy-0.1.26 test/test_exception.rb
rucy-0.1.25 test/test_exception.rb
rucy-0.1.24 test/test_exception.rb
rucy-0.1.23 test/test_exception.rb
rucy-0.1.22 test/test_exception.rb