<commit_before>"""
Test that clang produces the __apple accelerator tables, for example, __apple_types, correctly.
"""

from __future__ import print_function


import os
import time
import lldb
from lldbsuite.test.decorators import *
from lldbsuite.test.lldbtest import *
from lldbsuite.test import lldbutil
from lldbsuite.test.lldbutil import symbol_type_to_str


class AppleTypesTestCase(TestBase):

    mydir = TestBase.compute_mydir(__file__)

    # rdar://problem/11166975
    @skipUnlessDarwin
    def test_debug_info_for_apple_types(self):
        """Test that __apple_types section does get produced by clang."""

        if not self.getCompiler().endswith('clang'):
            self.skipTest("clang compiler only test")

        self.build()
        if self.debug_info == "dsym":
            exe = self.getBuildArtifact(
                               "a.out.dSYM/Contents/Resources/DWARF/a.out")
        else:
            exe = self.getBuildArtifact("main.o")

        target = self.dbg.CreateTarget(exe)<commit_msg>Fix TestAppleTypesIsProduced after r324226<commit_after>"""
Test that clang produces the __apple accelerator tables, for example, __apple_types, correctly.
"""

from __future__ import print_function


import os
import time
import lldb
from lldbsuite.test.decorators import *
from lldbsuite.test.lldbtest import *
from lldbsuite.test import lldbutil
from lldbsuite.test.lldbutil import symbol_type_to_str


class AppleTypesTestCase(TestBase):

    mydir = TestBase.compute_mydir(__file__)

    # rdar://problem/11166975
    @skipUnlessDarwin
    def test_debug_info_for_apple_types(self):
        """Test that __apple_types section does get produced by clang."""

        if not self.getCompiler().endswith('clang'):
            self.skipTest("clang compiler only test")

        self.build()
        if self.getDebugInfo() == "dsym":
            exe = self.getBuildArtifact(
                               "a.out.dSYM/Contents/Resources/DWARF/a.out")
        else:
            exe = self.getBuildArtifact("main.o")

        target = self.dbg.CreateTarget(exe)
{'fraction_non_alphanumeric': 0.09112709832134293, 'fraction_numerical': 0.010551558752997603, 'mean_word_length': 3.106299212598425, 'pattern_counts': {'":': 2, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6444468', 'n_tokens_mistral': 681, 'n_tokens_neox': 636, 'n_words': 148}