C0 code coverage information

Generated on Wed Aug 01 14:04:26 -0300 2007 with rcov 0.8.0


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.
Name Total lines Lines of code Total coverage Code coverage
lib/descriptor.rb 56 46
94.6% 
93.5% 
 1 module YAJD
 2 
 3 class Descriptor
 4     attr_reader :elements
 5 
 6     def initialize(value)
    def initialize(value)
    502   lib/method_descriptor.rb:8 in 'YAJD::MethodDescriptor#initialize'
    302   lib/visitor/javap/field_info.rb:12 in 'YAJD::Visitor::Javap::FieldInfoVisitor#accept'
    198   lib/method_descriptor.rb:9 in 'YAJD::MethodDescriptor#initialize'
      1   test/tc_descriptor.rb:46 in 'TestDescriptor#test_invalid_class'
      1   test/tc_descriptor.rb:33 in 'TestDescriptor#test_class'
      1   test/tc_descriptor.rb:12 in 'TestDescriptor#test_one'
      1   test/tc_descriptor.rb:22 in 'TestDescriptor#test_array'
      1   test/tc_descriptor.rb:38 in 'TestDescriptor#test_classes'
      1   test/tc_descriptor.rb:17 in 'TestDescriptor#test_two'
      1   test/tc_descriptor.rb:25 in 'TestDescriptor#test_array'
      1   test/tc_descriptor.rb:28 in 'TestDescriptor#test_array'

 7         @elements = parse(value)
        @elements = parse(value)
   1010   YAJD::Descriptor#parse at lib/descriptor.rb:27

 8     end
 9 
10 protected
11     def descriptor(what, array_level)
    def descriptor(what, array_level)
    654   lib/descriptor.rb:33 in 'YAJD::Descriptor#parse'
    433   lib/descriptor.rb:43 in 'YAJD::Descriptor#parse'

12         "#{what}#{'[]' * array_level}"
13     end
14 
15     TYPES = {
16         'I' => 'int',
17         'D' => 'double',
18         'B' => 'byte',
19         'C' => 'char',
20         'F' => 'float',
21         'J' => 'long',
22         'S' => 'short',
23         'Z' => 'boolean',
24     }
25 
26     #TODO for validation: check parameters length (255 or less, long/double 2, rest 1)
27     def parse(descriptor)
    def parse(descriptor)
   1010   lib/descriptor.rb:7 in 'YAJD::Descriptor#initialize'

28         aux = []
29         orig = descriptor
30         array_level = 0
31         while !descriptor.nil? and descriptor.length > 0 do
32             if TYPES.has_key?(descriptor[0].chr)
33                 aux << descriptor(TYPES[descriptor[0].chr], array_level)
                aux << descriptor(TYPES[descriptor[0].chr], array_level)
    654   YAJD::Descriptor#descriptor at lib/descriptor.rb:11

34                 array_level = 0
35             elsif descriptor[0].chr == '['
36                 array_level += 1
37             elsif descriptor[0].chr == 'L'
38                 pos = descriptor.index(';')
39 
40                 raise YAJDError, "Missing ';' (#{descriptor})" if pos.nil?
41 
42                 klass = Util::Java::FQF::to_java(descriptor[1, pos-1])
                klass = Util::Java::FQF::to_java(descriptor[1, pos-1])
    433   #<Class:YAJD::Util::Java::FQF>#to_java at lib/utils.rb:67

43                 aux << descriptor(klass, array_level)
                aux << descriptor(klass, array_level)
    433   YAJD::Descriptor#descriptor at lib/descriptor.rb:11

44                 descriptor = descriptor[pos..-1]
45 
46                 array_level = 0
47             else
48                 raise YAJDError, "Invalid element (#{descriptor[0].chr}) for '#{orig}'"
49             end
50             descriptor = descriptor[1..-1]
51         end
52         aux
53     end
54 end
55 
56 end

Generated using the rcov code coverage analysis tool for Ruby version 0.8.0.

Valid XHTML 1.0! Valid CSS!