src/test/java/com/acme/calculator/main/CalculatorAssignmentTest.java
// Fyi, a depth of 12 produces an expression string that is 69,636 characters long.
Fyi, a depth of 12 produces an expression string that is 69,636 characters long.
Fyi a depth of 12 produces an expression string that is 69 636 characters long .
private String assignLevelsDeep(int depth) {
        String varName = "a";
        String exprFormat = "let(%s,7,add(%s,5))";
        for (int ctr = 0; ctr < depth; ctr++) {
            String var = varName + (char)('a' + ctr);
            exprFormat = String.format(exprFormat, var, exprFormat);
        }
        String expr = String.format(exprFormat,"zzz", "zzz");
        return calc(expr);
    }
private String assignLevelsDeep ( int depth ) { String varName = "a" ; String exprFormat = "let(%s,7,add(%s,5))" ; for ( int ctr = 0 ; ctr < depth ; ctr ++ ) { String var = varName + ( char ) ( 'a' + ctr ) ; exprFormat = String . format ( exprFormat , var , exprFormat ) ; } String expr = String . format ( exprFormat , "zzz" , "zzz" ) ; return calc ( expr ) ; }
Fyi, a depth of 12 produces an expression string that is 69,636 characters long.
Fyi a depth of 12 produces an expression string that is 69 636 characters long .