<commit_before>package com.vaadin.tests.components.label;

import java.util.ArrayList;
import java.util.List;

import com.vaadin.tests.components.ComponentTestCase;
import com.vaadin.tests.util.LoremIpsum;
import com.vaadin.ui.Button;
import com.vaadin.ui.CheckBox;
import com.vaadin.ui.Component;
import com.vaadin.ui.HorizontalLayout;
import com.vaadin.ui.Label;
import com.vaadin.ui.Button.ClickEvent;

public class Labels extends ComponentTestCase {

    Label label[] = new Label[20];

    @Override
    protected void setup() {
        super.setup();

        Label l;
        l = createLabel("This is an undefined wide label which do not wrap. It should be clipped at the end of the screen"
                + LoremIpsum.get(1000));
        l.setWidth(null);
        addTestComponent(l);

        l = createLabel("This is a 200px wide simple label which wrap");
        l.setWidth("200px");
        addTestComponent(l);

        l = createLabel("This is a 100% wide simple label which should wrap. "
                + LoremIpsum.get(1500));
        l.setWidth("100%");
        addTestComponent(l);

        l = createLabel("This is a 100% wide simple with fixed 65px height. It should wrap. "
                + LoremIpsum.get(5000));
        l.setWidth("100%");
        l.setHeight("65px");
        addTestComponent(l);

        l = createLabel(
                "<div style='border: 1px solid red'><h1>Hello</h1><p/><h2>I am a rich Label</h3></div>",
                "This is an XHTML label with rich content");
        l.setContentMode(Label.CONTENT_XHTML);<commit_msg>Added some spaces and newlines. Should not change test outcome.<commit_after>package com.vaadin.tests.components.label;

import java.util.ArrayList;
import java.util.List;

import com.vaadin.tests.components.ComponentTestCase;
import com.vaadin.tests.util.LoremIpsum;
import com.vaadin.ui.Button;
import com.vaadin.ui.CheckBox;
import com.vaadin.ui.Component;
import com.vaadin.ui.HorizontalLayout;
import com.vaadin.ui.Label;
import com.vaadin.ui.Button.ClickEvent;

public class Labels extends ComponentTestCase {

    Label label[] = new Label[20];

    @Override
    protected void setup() {
        super.setup();

        Label l;
        l = createLabel("This is an undefined\nwide\nlabel               which do not wrap. It should be clipped at the end of the screen"
                + LoremIpsum.get(1000));
        l.setWidth(null);
        addTestComponent(l);

        l = createLabel("This is a 200px wide simple label which\n\n\nwrap");
        l.setWidth("200px");
        addTestComponent(l);

        l = createLabel("This is a 100% wide simple label which should wrap. "
                + LoremIpsum.get(1500));
        l.setWidth("100%");
        addTestComponent(l);

        l = createLabel("This is a\n\n     100%\t\t\t   \twide simple with fixed 65px height. It should wrap. "
                + LoremIpsum.get(5000));
        l.setWidth("100%");
        l.setHeight("65px");
        addTestComponent(l);

        l = createLabel(
                "<div style='border: 1px solid red'><h1>Hello\n\n\n</h1><p/><h2>I am a rich Label</h3></div>",
                "This is an XHTML label with rich content");
        l.setContentMode(Label.CONTENT_XHTML);
{'fraction_non_alphanumeric': 0.11887896519864491, 'fraction_numerical': 0.02525408068986757, 'mean_word_length': 2.5968992248062017, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 17, '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': '3746407', 'n_tokens_mistral': 1084, 'n_tokens_neox': 985, 'n_words': 257}