mirror of
https://github.com/DanilaFe/abacus
synced 2024-12-04 15:32:59 -08:00
Fix toString errors failing unit tests.
This commit is contained in:
parent
355a91d690
commit
ff7d90967e
|
@ -28,7 +28,7 @@ data class FunctionNode(val function: String) : TreeNode() {
|
|||
buffer.append(children[i].toString())
|
||||
buffer.append(if (i == children.size - 1) ")" else ",")
|
||||
}
|
||||
return super.toString()
|
||||
return buffer.toString()
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -16,4 +16,8 @@ data class UnaryNode(val operation: String, val applyTo: TreeNode? = null) : Tre
|
|||
return reducer.reduceNode(this, reducedChild)
|
||||
}
|
||||
|
||||
override fun toString(): String {
|
||||
return "(" + (applyTo?.toString() ?: "null") + ")" + operation
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user