<commit_before>import "../typings/index.d.ts";
import File from "../src/file";
import Runner from "../src/runner";
import * as chai from "chai";
import * as Statements from "../src/statements/";

let expect = chai.expect;

describe("statement_type", () => {
  let tests = [
    {code: "REPORT zfoo.", type: Statements.Report, name: "Report"},
    {code: "WRITE 'Hello'.", type: Statements.Write, name: "Write"},
    {code: "DO.", type: Statements.Do, name: "DO1"},
    {code: "DO 2 TIMES.", type: Statements.Do, name: "DO2"},
    {code: "asdf", type: Statements.Unknown, name: "Unknown"},
    {code: "\" 'abc'.FOO", type: Statements.Comment, name: "Comment"},
    {code: "WRITE 'Hello'", type: Statements.Unknown, name: "Unknown"},
    ];

  tests.forEach((test) => {
    let file = new File("temp.abap", test.code);
    Runner.run([file]);
    let slist = file.getStatements();

    it("\"" + test.code + "\" should be 1 statement", () => {
      expect(slist.length).to.equals(1);
    });

    it("\"" + test.code + "\" should be " + test.name, () => {
      let compare = slist[0] instanceof test.type;
      expect(compare).to.equals(true);
    });<commit_msg>few more unit tests<commit_after>import "../typings/index.d.ts";
import File from "../src/file";
import Runner from "../src/runner";
import * as chai from "chai";
import * as Statements from "../src/statements/";

let expect = chai.expect;

describe("statement_type", () => {
  let tests = [
    {code: "REPORT zfoo.", type: Statements.Report, name: "Report"},
    {code: "WRITE 'Hello'.", type: Statements.Write, name: "Write"},
    {code: "DO.", type: Statements.Do, name: "DO1"},
    {code: "DO 2 TIMES.", type: Statements.Do, name: "DO2"},
    {code: "SORT foo BY bar ASCENDING.", type: Statements.Sort, name: "SORT1"},
    {code: "SEARCH text FOR 'foobar'.", type: Statements.Search, name: "SEARCH1"},
    {code: "MODIFY foo FROM wa.", type: Statements.Modify, name: "MODIFY1"},
    {code: "ENDINTERFACE.", type: Statements.Endinterface, name: "ENDINTERFACE1"},
    {code: "GET TIME.", type: Statements.Get, name: "GET1"},
    {code: "asdf", type: Statements.Unknown, name: "Unknown"},
    {code: "\" 'abc'.FOO", type: Statements.Comment, name: "Comment"},
    {code: "WRITE 'Hello'", type: Statements.Unknown, name: "Unknown"},
    ];

  tests.forEach((test) => {
    let file = new File("temp.abap", test.code);
    Runner.run([file]);
    let slist = file.getStatements();

    it("\"" + test.code + "\" should be 1 statement", () => {
      expect(slist.length).to.equals(1);
    });

    it("\"" + test.code + "\" should be " + test.name, () => {
      let compare = slist[0] instanceof test.type;
      expect(compare).to.equals(true);
    });
{'fraction_non_alphanumeric': 0.21044885945548197, 'fraction_numerical': 0.006254598969830758, 'mean_word_length': 3.435562805872757, 'pattern_counts': {'":': 0, '<': 3, '<?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': '3706275', 'n_tokens_mistral': 934, 'n_tokens_neox': 916, 'n_words': 246}