<commit_before>/*
 * This file is released under the MIT license.
 * Copyright (c) 2016, 2022, <NAME>
 *
 * See LICENSE file for more info.
 */

import * as fs from "fs";

import { AntlrFacade } from "../../src/backend/facade";
import { RuleMappings, SymbolKind } from "../../src/backend/types";
import { SourceContext } from "../../src/backend/SourceContext";
import { positionToIndex, indexToPosition } from "./test-helpers";

interface ITestRange {
    source: {
        start: {
            column: number;
            row: number;
        };
        end: {
            column: number;
            row: number;
        };
    };
    target: {
        start: {
            column: number;
            row: number;
        };
        end: {
            column: number;
            row: number;
        };
    };
    result: string;
}

describe("vscode-antlr4-backend:", () => {
    const backend = new AntlrFacade(".", process.cwd()); // Search path is cwd for this test.

    jest.setTimeout(20000);

    describe("Base Handling:", () => {
        it("Create Backend", () => {
            expect(1).toBe(1);
            expect(backend).toHaveProperty("loadGrammar");
            expect(backend).toHaveProperty("releaseGrammar");
            expect(backend).toHaveProperty("reparse");
            expect(backend).toHaveProperty("infoForSymbol");
            expect(backend).toHaveProperty("listTopLevelSymbols");
            expect(backend).toHaveProperty("getDiagnostics");
        });<commit_msg>Need more timeout for CircleCI<commit_after>/*
 * This file is released under the MIT license.
 * Copyright (c) 2016, 2022, <NAME>
 *
 * See LICENSE file for more info.
 */

import * as fs from "fs";

import { AntlrFacade } from "../../src/backend/facade";
import { RuleMappings, SymbolKind } from "../../src/backend/types";
import { SourceContext } from "../../src/backend/SourceContext";
import { positionToIndex, indexToPosition } from "./test-helpers";

interface ITestRange {
    source: {
        start: {
            column: number;
            row: number;
        };
        end: {
            column: number;
            row: number;
        };
    };
    target: {
        start: {
            column: number;
            row: number;
        };
        end: {
            column: number;
            row: number;
        };
    };
    result: string;
}

describe("vscode-antlr4-backend:", () => {
    const backend = new AntlrFacade(".", process.cwd()); // Search path is cwd for this test.

    jest.setTimeout(50000);

    describe("Base Handling:", () => {
        it("Create Backend", () => {
            expect(1).toBe(1);
            expect(backend).toHaveProperty("loadGrammar");
            expect(backend).toHaveProperty("releaseGrammar");
            expect(backend).toHaveProperty("reparse");
            expect(backend).toHaveProperty("infoForSymbol");
            expect(backend).toHaveProperty("listTopLevelSymbols");
            expect(backend).toHaveProperty("getDiagnostics");
        });
{'fraction_non_alphanumeric': 0.14716605899900564, 'fraction_numerical': 0.010606562810739144, 'mean_word_length': 2.1145510835913313, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 11, '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': '492334', 'n_tokens_mistral': 854, 'n_tokens_neox': 837, 'n_words': 192}