Files
clang-p2996/lldb/test/API/commands/expression/call-function/TestCallBuiltinFunction.py
Dave Lee 4cc8f2a017 [lldb][tests] Automatically call compute_mydir (NFC)
Eliminate boilerplate of having each test manually assign to `mydir` by calling
`compute_mydir` in lldbtest.py.

Differential Revision: https://reviews.llvm.org/D128077
2022-06-17 14:34:49 -07:00

27 lines
789 B
Python

"""
Tests calling builtin functions using expression evaluation.
"""
import lldb
from lldbsuite.test.decorators import *
from lldbsuite.test.lldbtest import *
from lldbsuite.test import lldbutil
class ExprCommandCallBuiltinFunction(TestBase):
# Builtins are expanded by Clang, so debug info shouldn't matter.
NO_DEBUG_INFO_TESTCASE = True
def test(self):
self.build()
target = self.createTestTarget()
self.expect_expr("__builtin_isinf(0.0f)", result_type="int", result_value="0")
self.expect_expr("__builtin_isnormal(0.0f)", result_type="int", result_value="0")
self.expect_expr("__builtin_constant_p(1)", result_type="int", result_value="1")
self.expect_expr("__builtin_abs(-14)", result_type="int", result_value="14")