Add an xfail test as 'expr myfloat' can add digits consistent

with the closest available 32-bit floating point representation.

llvm-svn: 191101
This commit is contained in:
Ashok Thirumurthi 2013-09-20 19:01:20 +00:00
parent bf40e95959
commit b742879c35
1 changed files with 12 additions and 1 deletions

View File

@ -33,7 +33,7 @@ class BasicExprCommandsTestCase(TestBase):
self.addTearDownHook(lambda: self.runCmd("settings clear auto-confirm"))
def test_many_expr_commands(self):
def build_and_run(self):
"""These basic expression commands should work as expected."""
self.buildDefault()
@ -43,6 +43,17 @@ class BasicExprCommandsTestCase(TestBase):
self.runCmd("run", RUN_SUCCEEDED)
@unittest2.expectedFailure # llvm.org/pr17135: APFloat::toString does not identify the correct (i.e. least) precision.
def test_floating_point_expr_commands(self):
self.build_and_run()
self.expect("expression 2.234f",
patterns = ["\(float\) \$.* = 2\.234"])
# (float) $2 = 2.234
def test_many_expr_commands(self):
self.build_and_run()
self.expect("expression 2",
patterns = ["\(int\) \$.* = 2"])
# (int) $0 = 1