lib/raap/cli.rb in raap-0.10.0 vs lib/raap/cli.rb in raap-1.0.0

- old
+ new

@@ -272,14 +272,16 @@ else prefix = '' end # type_args delegate to self_type - type_params_decl.each_with_index do |param, i| - if rtype.instance_of?(::RBS::Types::ClassInstance) - rtype.args[i] = type_args[i] || param.upper_bound || ::RBS::Types::Bases::Any.new(location: nil) + if rtype.instance_of?(::RBS::Types::ClassInstance) + args = type_params_decl.map.with_index do |param, i| + type_args[i] || param.upper_bound || ::RBS::Types::Bases::Any.new(location: nil) end + rtype = ::RBS::Types::ClassInstance.new(name: rtype.name, args: args, location: rtype.location) + receiver_type = Type.new(rtype) end RaaP.logger.info("## def #{prefix}#{method_name}: #{method_type}") status = 0 reason = nil prop = MethodProperty.new( @@ -303,11 +305,11 @@ case called in Result::Success => s print '.' RaaP.logger.debug { "Success: #{s.called_str}" } in Result::Failure => f - puts 'F' + print 'F' if (e = f.exception) RaaP.logger.info { "Failure: [#{e.class}] #{e.message}" } RaaP.logger.debug { e.backtrace.join("\n") } end RaaP.logger.debug { PP.pp(f.symbolic_call, ''.dup) } @@ -334,15 +336,15 @@ end end end_time = Process.clock_gettime(Process::CLOCK_MONOTONIC) puts RaaP::Coverage.show($stdout) if @option.coverage - puts time_diff = end_time - start_time time = ", time: #{(time_diff * 1000).round}ms" stats_log = "success: #{stats.success}, skip: #{stats.skip}, exception: #{stats.exception}#{time}" RaaP.logger.info(stats_log) + puts if status == 0 && stats.success.zero? && !stats.break status = 1 reason = StringIO.new reason.puts "Never succeeded => #{stats_log}"