<commit_before>Strict

Private

Import bono
Import mojo

Public

Class TexturePackerTest Extends AppTestCase
    Field mockLoader:MockImageLoader

    Method SetUp:Void()
        mockLoader = New MockImageLoader()
        TexturePacker.defaultImageLoader = mockLoader
    End

    Method TestWithExampleSprite:Void()
        Local tp := New TexturePacker(
            "io/texturepacker/sprite/sprite.xml",
            New MojoImageLoader())

        RenderAndCompare(tp, "rect-green.png")<commit_msg>reset TexturePacker.defaultImageLoader in test TearDown<commit_after>Strict

Private

Import bono
Import mojo

Public

Class TexturePackerTest Extends AppTestCase
    Field mockLoader:MockImageLoader

    Method SetUp:Void()
        mockLoader = New MockImageLoader()
        TexturePacker.defaultImageLoader = mockLoader
    End

    Method TearDown:Void()
        TexturePacker.defaultImageLoader = Null
    End

    Method TestWithExampleSprite:Void()
        Local tp := New TexturePacker(
            "io/texturepacker/sprite/sprite.xml",
            New MojoImageLoader())

        RenderAndCompare(tp, "rect-green.png")
{'fraction_non_alphanumeric': 0.0674955595026643, 'fraction_numerical': 0.0, 'mean_word_length': 3.174074074074074, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, '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': '4719087', 'n_tokens_mistral': 327, 'n_tokens_neox': 325, 'n_words': 72}