<commit_before>package com.valkryst.VTerminal.component.TileGridTest;

import com.valkryst.VTerminal.AsciiCharacter;
import com.valkryst.VTerminal.component.TileGrid;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;

public class RemoveChildTest {
    private TileGrid parentGrid;

    @Before
    public void initGrid() {
        /*
         * The grid looks like this:
         *
         * ABCDEF
         * ABCDEF
         * ABCDEF
         * ABCDEF
         * ABCDEF
         * ABCDEF
         */
        parentGrid = new TileGrid(6, 6);

        for (int y = 0 ; y < parentGrid.getHeight() ; y++) {
            final AsciiCharacter[] row = parentGrid.getRow(y);

            for (int x = 0 ; x < parentGrid.getWidth() ; x++) {
                row[x].setCharacter((char) (x + 65));
            }
        }
    }

    @Test
    public void testRemoveChild_withValidChild() {
        final TileGrid grid = new TileGrid(1, 1);

        parentGrid.addChild(grid);
        Assert.assertTrue(parentGrid.containsChild(grid));

        parentGrid.removeChild(grid);
        Assert.assertFalse(parentGrid.containsChild(grid));
    }

    @Test
    public void testRemoveChild_withValidChildThatIsntAChildOfTheGrid() {
        final TileGrid grid = new TileGrid(1, 1);

        parentGrid.removeChild(grid);
        Assert.assertFalse(parentGrid.containsChild(grid));<commit_msg>Updates test to work with API changes<commit_after>package com.valkryst.VTerminal.component.TileGridTest;

import com.valkryst.VTerminal.AsciiCharacter;
import com.valkryst.VTerminal.component.TileGrid;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;

import java.awt.Dimension;

public class RemoveChildTest {
    private TileGrid parentGrid;

    @Before
    public void initGrid() {
        /*
         * The grid looks like this:
         *
         * ABCDEF
         * ABCDEF
         * ABCDEF
         * ABCDEF
         * ABCDEF
         * ABCDEF
         */
        parentGrid = new TileGrid(new Dimension(6, 6));

        for (int y = 0 ; y < parentGrid.getHeight() ; y++) {
            final AsciiCharacter[] row = parentGrid.getRow(y);

            for (int x = 0 ; x < parentGrid.getWidth() ; x++) {
                row[x].setCharacter((char) (x + 65));
            }
        }
    }

    @Test
    public void testRemoveChild_withValidChild() {
        final TileGrid grid = new TileGrid(new Dimension(1, 1));

        parentGrid.addChild(grid);
        Assert.assertTrue(parentGrid.containsChild(grid));

        parentGrid.removeChild(grid);
        Assert.assertFalse(parentGrid.containsChild(grid));
    }

    @Test
    public void testRemoveChild_withValidChildThatIsntAChildOfTheGrid() {
        final TileGrid grid = new TileGrid(new Dimension(1, 1));

        parentGrid.removeChild(grid);
        Assert.assertFalse(parentGrid.containsChild(grid));
{'fraction_non_alphanumeric': 0.10473556861389562, 'fraction_numerical': 0.0069132388524023505, 'mean_word_length': 2.3612078977932636, 'pattern_counts': {'":': 0, '<': 7, '<?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': '3524463', 'n_tokens_mistral': 891, 'n_tokens_neox': 853, 'n_words': 178}