add(X, Y, R) :- R is X + Y + 1.
add(X, Y, R) :- R is X + Y + 1.
add(X, Y, R) :- R is X + Y.
add0(_, _, _).
add_or_sub(X, Y, R) :- R is X + Y; R is X - Y.
Unnamedvs.UnnamedFailed Tests

Fixed

(The last line of the message is still missing.)

Code
Diff
  • unit module Solution;
    error-here-again
  • 11
    unit module Solution;
    
    2
    error-here
    
    2+
    error-here-again
    
unit module Foo;
error-here
Code
Diff
  • unit module Solution;
    
    try { sink shell 'raku -e "error-here"'; }
    try { sink shell 'RAKUDO_ERROR_COLOR=0 raku -e "error-here"'; }
  • 11
    unit module Solution;
    
    2
    error-here-too
    
    2+
    3+
    try { sink shell 'raku -e "error-here"'; }
    
    4+
    try { sink shell 'RAKUDO_ERROR_COLOR=0 raku -e "error-here"'; }
    
Code
Diff
  • // fixed
    int foo() { return 1; }
    int bar() { return 2; }
    int baz() { return 3; }
  • 1+
    // fixed
    
    11
    int foo() { return 1; }
    
    22
    int bar() { return 2; }
    
    33
    int baz() { return 3; }
    

Looks OK without the tests, the message is in STDERR.

Code
Diff
  • unit module Solution;
    error-here-too
  • 11
    unit module Solution;
    
    2
    error-here
    
    2+
    error-here-too
    
unit module Solution;
error-here

With bool

Code
Diff
  • public class NthFib {
      public static final double phi = (1 + Math.sqrt(5))/2.0;
      
      public static int fib(int n) {
        return (int)Math.round(Math.pow(phi, n)/Math.sqrt(5));
      }
    }
    
  • 11
    public class NthFib {
    
    22
      public static final double phi = (1 + Math.sqrt(5))/2.0;
    
    3
      public static final double psi = (1 - Math.sqrt(5))/2.0;
    
    44
      
    
    55
      public static int fib(int n) {
    
    6
        return (int)((Math.pow(phi, n) - Math.pow(psi, n))/Math.sqrt(5));
    
    5+
        return (int)Math.round(Math.pow(phi, n)/Math.sqrt(5));
    
    77
      }
    
    88
    }
    
int foo() { return 1; }
int bar() { return 2; }
int baz() { return 3; }
component {
    function foo() {
        var x = 0;
        if (false) x \= 1;
    }
}
UnnamedFailed Tests

What?

import java.util.stream.Stream;

public class Main {
  public static Stream<String> foo() {
    return
      Stream.of("a").flatMap(_a ->
        Stream.of("b").flatMap(_b ->
          Stream.of("c-foo", "d", "d")));
  }
  
  public static Stream<String> bar() {
    return
      Stream.of("a").flatMap(_a ->
          Stream.iterate("c-bar", _x -> "d"));
  }
  
  public static Stream<String> baz() {
    return
      Stream.of("a").flatMap(_a ->
        Stream.of("b").flatMap(_b ->
          Stream.iterate("c-baz", _x -> "d")));
  }
}
Loading more items...