To protect your data, the CISO officer has suggested users to enable GitLab 2FA as soon as possible.

Commit 6ac52a3c authored by Tobias Pape's avatar Tobias Pape Committed by Stefan Marr
Browse files

Fix Test instance of IntegerTest failed: SquareRoot failed. Expected: Integer, but Actual: Double

parent a067f43b
......@@ -29,7 +29,11 @@ def _asString(ivkbl, frame, interpreter):
def _sqrt(ivkbl, frame, interpreter):
rcvr = frame.pop()
frame.push(interpreter.get_universe().new_double(math.sqrt(rcvr.get_embedded_integer())))
res = math.sqrt(rcvr.get_embedded_integer())
if res == float(int(res)):
frame.push(interpreter.get_universe().new_integer(int(res)))
else:
frame.push(interpreter.get_universe().new_double(res))
def _atRandom(ivkbl, frame, interpreter):
rcvr = frame.pop()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment