1""" 2Tests calling builtin functions using expression evaluation. 3""" 4 5 6 7import lldb 8from lldbsuite.test.decorators import * 9from lldbsuite.test.lldbtest import * 10from lldbsuite.test import lldbutil 11 12 13class ExprCommandCallBuiltinFunction(TestBase): 14 15 # Builtins are expanded by Clang, so debug info shouldn't matter. 16 NO_DEBUG_INFO_TESTCASE = True 17 18 def test(self): 19 self.build() 20 21 target = self.createTestTarget() 22 23 self.expect_expr("__builtin_isinf(0.0f)", result_type="int", result_value="0") 24 self.expect_expr("__builtin_isnormal(0.0f)", result_type="int", result_value="0") 25 self.expect_expr("__builtin_constant_p(1)", result_type="int", result_value="1") 26 self.expect_expr("__builtin_abs(-14)", result_type="int", result_value="14") 27