Gecoder C0 Coverage Information - RCov

lib/gecoder/interface/constraints/fixnum_enum/operation.rb

Name Total Lines Lines of Code Total Coverage Code Coverage
lib/gecoder/interface/constraints/fixnum_enum/operation.rb 65 26
100.00%
100.00%

Key

Code reported as executed by Ruby looks like this...and this: this line is also marked as covered.Lines considered as run by rcov, but not reported by Ruby, look like this,and this: these lines were inferred by rcov (using simple heuristics).Finally, here's a line marked as not executed.

Coverage Details

1 module Gecode::FixnumEnum
2   module FixnumEnumOperand
3     # Produces a new SetOperand representing the union between this operand, 
4     # interpreted as a constant set, and +set_operand+.
5     #
6     # ==== Examples 
7     #
8     #   # The union between +fixnum_enum+ and +set+.
9     #   fixnum_enum.union set
10     def union(set_operand)
11       set_operation(:union, set_operand)
12     end
13 
14     # Produces a new SetOperand representing the disjoint union between
15     # this operand, interpreted as a constant set, and
16     # +set_operand+. The disjoint union is the union of
17     # the disjoint parts of the sets.
18     #
19     # ==== Examples 
20     #
21     #   # The disjoint union between +fixnum_enum+ and +set+.
22     #   fixnum_enum.disjoint_union set
23     def disjoint_union(set_operand)
24       set_operation(:disjoint_union, set_operand)
25     end
26 
27     # Produces a new SetOperand representing the intersection between
28     # this operand, interpreted as a constant set, and
29     # +set_operand+. 
30     #
31     # ==== Examples 
32     #
33     #   # The intersection between +fixnum_enum+ and +set+.
34     #   fixnum_enum.intersection set
35     def intersection(set_operand)
36       set_operation(:intersection, set_operand)
37     end
38 
39     # Produces a new SetOperand representing this operand, interpreted
40     # as a constant set, minus +set_operand+. 
41     #
42     # ==== Examples 
43     #
44     #   # +fixnum_enum+ minus +set+.
45     #   fixnum_enum.minus set
46     def minus(set_operand)
47       set_operation(:minus, set_operand)
48     end
49 
50     private 
51 
52     # Starts a constraint on this set #{name} the specified set.
53     def set_operation(operator, operand2)
54       unless operand2.respond_to? :to_set_var
55         raise TypeError, 'Expected set operand as ' + 
56           "operand, got \#{operand2.class}."
57       end
58 
59       return Operation::OperationSetOperand.new(model, self, 
60         operator, operand2)
61     end
62   end
63 
64   Operation = Gecode::Set::Operation
65 end

Generated on Thu Jan 08 13:27:03 +0100 2015 with rcov 1.0.0