Expected behaviour: When passing "1 1/2" to interpret(), the expected output would be 1.5
Actual behaviour: When passing "1 1/2" to interpret(), the actual output is 5.5
Code example:
import 'package:test/test.dart';
import 'package:function_tree/function_tree.dart';
void main() {
test('Test interpret()', () {
String s = "1 1/2";
num n = s.interpret();
expect(n, 1.5); //this will not pass as n==5.5
});
}
Expected behaviour: When passing
"1 1/2"tointerpret(), the expected output would be1.5Actual behaviour: When passing
"1 1/2"tointerpret(), the actual output is5.5Code example: