package Ġcom . g ig aw ork s . tech . calculator . ui . main . helper Ċ Ċ import Ġcom . g ig aw ork s . tech . calculator . util . Angle Type Ċ import Ġorg . junit . Assert .* Ċ import Ġorg . junit . Test Ċ Ċ class ĠEvaluate UnitTest Ġ{ ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġtest Prepare Expression () Ġ{ ĊĠĠĠĠĠĠĠ ĠassertEquals ("", Ġprepare Expression ("")) ĊĠĠĠĠĠĠĠ ĠassertEquals (" 5 / 6 ", Ġprepare Expression (" 5 Ã · 6 ")) ĊĠĠĠĠĠĠĠ ĠassertEquals (" 5 + ${ Math . E }", Ġprepare Expression (" 5 + e ")) ĊĠĠĠĠĠĠĠ ĠassertEquals (" 5 +- 5 ", Ġprepare Expression (" 5 - 5 ")) ĊĠĠĠĠĠĠĠ ĠassertEquals (" 5 /- 5 ", Ġprepare Expression (" 5 Ã · - 5 ")) ĊĠĠĠĠĠĠĠ ĠassertEquals (" 5 ^ - 5 ", Ġprepare Expression (" 5 ^ - 5 ")) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun ĠtestGet Result () Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġdeg Ġ= ĠAngle Type . DEG . name ĊĠĠĠĠĠĠĠ Ġval Ġrad Ġ= ĠAngle Type . RAD . name ĊĠĠĠĠĠĠĠ ĠassertEquals (" 1 0 ", Ġround My Answer ( getResult (" 5 + 5 ", Ġdeg ))) ĊĠĠĠĠĠĠĠ ĠassertEquals (" 1 ", Ġround My Answer ( getResult (" sin ( 9 0 )", Ġdeg ))) ĊĠĠĠĠĠĠĠ ĠassertEquals (" 0 ", Ġround My Answer ( getResult (" cos ( 9 0 )", Ġdeg ))) ĊĠĠĠĠĠĠĠ ĠassertEquals (" 1 ", Ġround My Answer ( getResult (" sin (${ Math . PI }/ 2 )", Ġrad ))) ĊĠĠĠĠĠĠĠ ĠassertEquals (" 0 ", Ġround My Answer ( getResult (" cos (${ Math . PI }/ 2 )", Ġrad ))) ĊĠĠĠĠĠĠĠ ĠassertEquals (" 0 ", Ġround My Answer ( getResult (" tan ( 0 )", Ġdeg ))) ĊĠĠĠĠĠĠĠ ĠassertEquals (" 0 ", Ġround My Answer ( getResult (" tan (${ Math . PI })", Ġrad ))) ĊĠĠĠĠĠĠĠ ĠassertEquals (" 9 0 ", Ġround My Answer ( getResult (" sin âģ » Â ¹ ( 1 )", Ġdeg ))) ĊĠĠĠĠĠĠĠ ĠassertEquals (" 0 ", Ġround My Answer ( getResult (" cos âģ » Â ¹ ( 1 )", Ġdeg ))) ĊĠĠĠĠĠĠĠ ĠassertEquals (" 4 5 ", Ġround My Answer ( getResult (" tan âģ » Â ¹ ( 1 )", Ġdeg ))) ĊĠĠĠĠĠĠĠ ĠassertEquals (" 1 ", Ġround My Answer ( getResult (" log ( 1 0 )", Ġdeg ))) ĊĠĠĠĠĠĠĠ ĠassertEquals (" 1 ", Ġround My Answer ( getResult (" ln (${ Math . E })", Ġdeg ))) ĊĠĠĠĠĠĠĠ ĠassertEquals (" 2 ", Ġround My Answer ( getResult (" âĪ ļ 4 ", Ġdeg ))) ĊĠĠĠĠĠĠĠ ĠassertEquals (" 2 ", Ġround My Answer ( getResult (" âĪ ļ âĪ ļ 1 6 ", Ġdeg ))) ĊĠĠĠĠĠĠĠ ĠassertEquals ("- 2 ", Ġround My Answer ( getResult (" +- âĪ ļ 4 ", Ġdeg ))) ĊĠĠĠĠĠĠĠ ĠassertEquals ("- 2 ", Ġround My Answer ( getResult (" +- âĪ Ľ 8 ", Ġdeg ))) ĊĠĠĠĠĠĠĠ ĠassertEquals (" 1 2 0 ", Ġround My Answer ( getResult (" 5 !", Ġdeg ))) ĊĠĠĠĠĠĠĠ ĠassertEquals (" 0 . 0 5 ", Ġround My Answer ( getResult (" 5 %", Ġdeg ))) ĊĠĠĠĠĠĠĠ ĠassertEquals (" 2 2 0 ", Ġround My Answer ( getResult (" 2 0 0 + 1 0 %", Ġdeg ))) ĊĠĠĠĠĠĠĠ ĠassertEquals (" 2 5 ", Ġround My Answer ( getResult (" 5 ^ 2 ", Ġdeg ))) ĊĠĠĠĠĠĠĠ ĠassertEquals (" 5 ", Ġround My Answer ( getResult (" 2 5 ^( 1 / 2 )", Ġdeg ))) ĊĠĠĠĠĠĠĠ ĠassertEquals (" 5 0 ", Ġround My Answer ( getResult (" 5 0 0 0 / 1 0 0 ", Ġdeg ))) ĊĠĠĠĠĠĠĠ ĠassertEquals (" 3 . 3 3 3 3 3 3 ", Ġround My Answer ( getResult (" 1 0 / 3 ", Ġdeg ))) ĊĠĠĠĠĠĠĠ ĠassertEquals (" 5 0 0 0 0 0 ", Ġround My Answer ( getResult (" 5 0 0 0 * 1 0 0 ", Ġdeg ))) ĊĠĠĠĠĠĠĠ ĠassertEquals (" 5 1 0 0 ", Ġround My Answer ( getResult (" 5 0 0 0 + 1 0 0 ", Ġdeg ))) ĊĠĠĠĠĠĠĠ ĠassertEquals (" 4 1 ", Ġround My Answer ( getResult (" 5 + 9 * 8 / 2 ", Ġdeg ))) ĊĠĠĠĠĠĠĠ ĠassertEquals (" 4 6 ", Ġround My Answer ( getResult (" 2 * 5 + 9 * 8 / 2 ", Ġdeg ))) ĊĠĠĠĠĠĠĠ ĠassertEquals (" 5 6 ", Ġround My Answer ( getResult ("( 5 + 9 )* 8 / 2 ", Ġdeg ))) ĊĠĠĠĠĠĠĠ ĠassertEquals (" 5 ", Ġround My Answer ( getResult (" 5 +", Ġdeg ))) ĊĠĠĠ Ġ} Ċ Ċ }