<commit_before>// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.searchdefinition.derived;

import com.yahoo.config.model.deploy.TestProperties;
import com.yahoo.searchdefinition.parser.ParseException;
import org.junit.Test;

import java.io.IOException;

/**
 * @author geirst
 */
public class ImportedFieldsTestCase extends AbstractExportingTestCase {

    @Test
    public void configs_for_imported_fields_are_derived() throws IOException, ParseException {
        assertCorrectDeriving("importedfields", "child", new TestableDeployLogger());
    }

    @Test
    public void configs_for_imported_struct_fields_are_derived() throws IOException, ParseException {
        assertCorrectDeriving("imported_struct_fields", "child",
                              new TestProperties().setExperimentalSdParsing(false),
                              new TestableDeployLogger());
    }

    @Test
    public void configs_for_imported_struct_fields_are_derived_new() throws IOException, ParseException {
        assertCorrectDeriving("imported_struct_fields", "child",
                              new TestProperties().setExperimentalSdParsing(true),
                              new TestableDeployLogger());
    }

    @Test
    public void configs_for_imported_position_field_are_derived() throws IOException, ParseException {
        assertCorrectDeriving("imported_position_field", "child", new TestableDeployLogger());
    }

    @Test
    public void configs_for_imported_position_field_summary_are_derived() throws IOException, ParseException {
        assertCorrectDeriving("imported_position_field_summary", "child", new TestableDeployLogger());
    }

    @Test
    public void derives_configs_for_imported_fields_when_reference_fields_are_inherited() throws IOException, ParseException {
        assertCorrectDeriving("imported_fields_inherited_reference", "child_c", new TestableDeployLogger());
    }<commit_msg>one step back for experimental parsing for now<commit_after>// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.searchdefinition.derived;

import com.yahoo.config.model.deploy.TestProperties;
import com.yahoo.searchdefinition.parser.ParseException;
import org.junit.Ignore;
import org.junit.Test;

import java.io.IOException;

/**
 * @author geirst
 */
public class ImportedFieldsTestCase extends AbstractExportingTestCase {

    @Test
    public void configs_for_imported_fields_are_derived() throws IOException, ParseException {
        assertCorrectDeriving("importedfields", "child", new TestableDeployLogger());
    }

    @Test
    public void configs_for_imported_struct_fields_are_derived() throws IOException, ParseException {
        assertCorrectDeriving("imported_struct_fields", "child",
                              new TestProperties().setExperimentalSdParsing(false),
                              new TestableDeployLogger());
    }

    @Test
    @Ignore
    public void configs_for_imported_struct_fields_are_derived_new() throws IOException, ParseException {
        assertCorrectDeriving("imported_struct_fields", "child",
                              new TestProperties().setExperimentalSdParsing(true),
                              new TestableDeployLogger());
    }

    @Test
    public void configs_for_imported_position_field_are_derived() throws IOException, ParseException {
        assertCorrectDeriving("imported_position_field", "child", new TestableDeployLogger());
    }

    @Test
    public void configs_for_imported_position_field_summary_are_derived() throws IOException, ParseException {
        assertCorrectDeriving("imported_position_field_summary", "child", new TestableDeployLogger());
    }

    @Test
    public void derives_configs_for_imported_fields_when_reference_fields_are_inherited() throws IOException, ParseException {
        assertCorrectDeriving("imported_fields_inherited_reference", "child_c", new TestableDeployLogger());
    }
{'fraction_non_alphanumeric': 0.07601184600197433, 'fraction_numerical': 0.0009871668311944718, 'mean_word_length': 3.9975339087546238, 'pattern_counts': {'":': 0, '<': 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': 8, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4674446', 'n_tokens_mistral': 1087, 'n_tokens_neox': 1030, 'n_words': 220}