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