'AbstractStringBuilder' has package private, so cannot be used in tests
This commit is contained in:
@@ -9,8 +9,8 @@ fun takeFirst(expr: StringBuilder): Char {
|
|||||||
return c
|
return c
|
||||||
}
|
}
|
||||||
|
|
||||||
fun evaluateArg(expr: AbstractStringBuilder, numbers: ArrayList<Int>): Int {
|
fun evaluateArg(expr: CharSequence, numbers: ArrayList<Int>): Int {
|
||||||
if (expr.length() == 0) throw Exception("Syntax error: Character expected");
|
if (expr.length == 0) throw Exception("Syntax error: Character expected");
|
||||||
val c = takeFirst(<!TYPE_MISMATCH!>expr<!>)
|
val c = takeFirst(<!TYPE_MISMATCH!>expr<!>)
|
||||||
if (c >= '0' && c <= '9') {
|
if (c >= '0' && c <= '9') {
|
||||||
val n = c - '0'
|
val n = c - '0'
|
||||||
|
|||||||
@@ -8,8 +8,8 @@ fun takeFirst(expr: StringBuilder): Char {
|
|||||||
return c
|
return c
|
||||||
}
|
}
|
||||||
|
|
||||||
fun evaluateArg(expr: AbstractStringBuilder, numbers: ArrayList<Int>): Int {
|
fun evaluateArg(expr: CharSequence, numbers: ArrayList<Int>): Int {
|
||||||
if (expr.length() == 0) throw Exception("Syntax error: Character expected");
|
if (expr.length == 0) throw Exception("Syntax error: Character expected");
|
||||||
val c = takeFirst(<error>expr</error>)
|
val c = takeFirst(<error>expr</error>)
|
||||||
if (c >= '0' && c <= '9') {
|
if (c >= '0' && c <= '9') {
|
||||||
val n = c - '0'
|
val n = c - '0'
|
||||||
|
|||||||
Reference in New Issue
Block a user