<commit_before>import ceylon.test {
    test
}
import ceylon.ast.api {
    BaseType,
    QualifiedType,
    UIdentifier,
    TypeNameWithArguments
}
import ceylon.ast.redhat {
    RedHatTransformer,
    qualifiedTypeToCeylon,
    compile=compileQualifiedType
}

QualifiedType t = QualifiedType {
    qualifyingType = QualifiedType {
        qualifyingType = BaseType(TypeNameWithArguments(UIdentifier("String")));
        nameAndArgs = TypeNameWithArguments(UIdentifier("Foo"), [BaseType(TypeNameWithArguments(UIdentifier("Nothing"), null))]);
    };
    nameAndArgs = TypeNameWithArguments(UIdentifier("Iterable"), [BaseType(TypeNameWithArguments(UIdentifier("String"), null))]);
};

test
shared void qualifiedType()
        => testConversion(RedHatTransformer.transformQualifiedType, qualifiedTypeToCeylon,
    t
);

test
shared void compileQualifiedType()
        => testCompilation(compile,
    "String.Foo<Nothing>.Iterable<String>"->t
);
<commit_msg>Add backend test for QualifiedType + GroupedType<commit_after>import ceylon.test {
    test
}
import ceylon.ast.api {
    BaseType,
    GroupedType,
    QualifiedType,
    UIdentifier,
    TypeNameWithArguments
}
import ceylon.ast.redhat {
    RedHatTransformer,
    qualifiedTypeToCeylon,
    compile=compileQualifiedType
}

QualifiedType t = QualifiedType {
    qualifyingType = QualifiedType {
        qualifyingType = BaseType(TypeNameWithArguments(UIdentifier("String")));
        nameAndArgs = TypeNameWithArguments(UIdentifier("Foo"), [BaseType(TypeNameWithArguments(UIdentifier("Nothing"), null))]);
    };
    nameAndArgs = TypeNameWithArguments(UIdentifier("Iterable"), [BaseType(TypeNameWithArguments(UIdentifier("String"), null))]);
};
QualifiedType t2 = QualifiedType {
    qualifyingType = GroupedType {
        type = t;
    };
    nameAndArgs = TypeNameWithArguments(UIdentifier("Inner"));
};

test
shared void qualifiedType()
        => testConversion(RedHatTransformer.transformQualifiedType, qualifiedTypeToCeylon,
    t,
    t2
);

test
shared void compileQualifiedType()
        => testCompilation(compile,
    "String.Foo<Nothing>.Iterable<String>"->t,
    "<String.Foo<Nothing>.Iterable<String>>.Inner"->t2
);

{'fraction_non_alphanumeric': 0.11283691183188671, 'fraction_numerical': 0.0013704888076747374, 'mean_word_length': 4.809018567639257, 'pattern_counts': {'":': 0, '<': 10, '<?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': '1459802', 'n_tokens_mistral': 660, 'n_tokens_neox': 647, 'n_words': 101}