srawlins-gmp 0.1.2 → 0.1.4.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,17 @@
1
+ class TC_ZeroDivisionExceptions < Test::Unit::TestCase
2
+ def setup
3
+ @a = GMP::Z.new(10)
4
+ @b = GMP::Z.new()
5
+ @c = GMP::Q.new(1)
6
+ @d = GMP::Q.new()
7
+ end
8
+
9
+ def test_division_by_zero
10
+ assert_raise(ZeroDivisionError) { @a.tdiv(0) }
11
+ assert_raise(ZeroDivisionError) { @a.tdiv(@b) }
12
+ assert_raise(ZeroDivisionError) { @d.inv }
13
+ assert_raise(ZeroDivisionError) { @d.inv! }
14
+ assert_raise(ZeroDivisionError) { @c/0 }
15
+ assert_raise(ZeroDivisionError) { @c/@d }
16
+ end
17
+ end
data/test/unit_tests.rb CHANGED
@@ -8,26 +8,9 @@ require 'tc_q'
8
8
  require 'tc_cmp'
9
9
  require 'tc_q_basic'
10
10
  require 'tc_z_exponentiation'
11
+ require 'tc_zerodivisionexceptions'
11
12
 
12
13
 
13
- class TC_ZeroDivisionExceptions < Test::Unit::TestCase
14
- def setup
15
- @a = GMP::Z.new(10)
16
- @b = GMP::Z.new()
17
- @c = GMP::Q.new(1)
18
- @d = GMP::Q.new()
19
- end
20
-
21
- def test_division_by_zero
22
- assert_raise(ZeroDivisionError) { @a.tdiv(0) }
23
- assert_raise(ZeroDivisionError) { @a.tdiv(@b) }
24
- assert_raise(ZeroDivisionError) { @d.inv }
25
- assert_raise(ZeroDivisionError) { @d.inv! }
26
- assert_raise(ZeroDivisionError) { @c/0 }
27
- assert_raise(ZeroDivisionError) { @c/@d }
28
- end
29
- end
30
-
31
14
  class TC_sgn_neg_abs < Test::Unit::TestCase
32
15
  def setup
33
16
  @a=GMP::Z.new(10)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: srawlins-gmp
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.4.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tomasz Wegrzanowski
@@ -12,9 +12,11 @@ cert_chain: []
12
12
 
13
13
  date: 2009-09-21 00:00:00 -07:00
14
14
  default_executable:
15
- dependencies:
16
- description: gmp is library providing Ruby bindings to GMP library.
15
+ dependencies: []
16
+
17
+ description: gmp is a library providing Ruby bindings to GMP library.
17
18
  email:
19
+ - Tomasz.Wegrzanowski@gmail.com
18
20
  - sam.rawlins@gmail.com
19
21
  executables: []
20
22
 
@@ -37,6 +39,7 @@ files:
37
39
  - test/tc_z_basic.rb
38
40
  - test/tc_z_exponentiation.rb
39
41
  - test/tc_z_logic.rb
42
+ - test/tc_zerodivisionexceptions.rb
40
43
  - test/test_helper.rb
41
44
  - test/unit_tests.rb
42
45
  - CHANGELOG
@@ -46,17 +49,10 @@ has_rdoc: false
46
49
  homepage: http://github.com/srawlins/gmp/tree/master
47
50
  licenses:
48
51
  post_install_message:
49
- rdoc_options:
50
- - --quiet
51
- - --title
52
- - gmp documentation
53
- - --opname
54
- - index.html
55
- - --line-numbers
56
- - --main
57
- - README
58
- - --inline-source
52
+ rdoc_options: []
53
+
59
54
  require_paths:
55
+ - lib
60
56
  required_ruby_version: !ruby/object:Gem::Requirement
61
57
  requirements:
62
58
  - - ">="
@@ -76,6 +72,5 @@ rubygems_version: 1.3.5
76
72
  signing_key:
77
73
  specification_version: 2
78
74
  summary: A library providing Ruby bindings to GMP library.
79
- test_files:
80
- - test/unit_tests.rb
81
- - test/test_helper.rb
75
+ test_files: []
76
+