<commit_before>/*---------------------------------------------------------------------------------------------
 *  Copyright (c) Microsoft Corporation. All rights reserved.
 *  Licensed under the MIT License. See License.txt in the project root for license information.
 *--------------------------------------------------------------------------------------------*/

import assert = require('assert');
import { PositionAffinity } from 'vs/editor/common/model';
import { ModelDecorationInjectedTextOptions } from 'vs/editor/common/model/textModel';
import { LineBreakData } from 'vs/editor/common/viewModel/viewModel';

suite('Editor ViewModel - LineBreakData', () => {
	test('Basic', () => {
		const data = new LineBreakData([], [], [100], [], 0);
		assert.strictEqual(data.translateToInputOffset(0, 50), 50);
		assert.strictEqual(data.translateToInputOffset(1, 50), 150);
	});

	function sequence(length: number, start = 0): number[] {
		const result = new Array<number>();<commit_msg>Improves LineBreakData test<commit_after>/*---------------------------------------------------------------------------------------------
 *  Copyright (c) Microsoft Corporation. All rights reserved.
 *  Licensed under the MIT License. See License.txt in the project root for license information.
 *--------------------------------------------------------------------------------------------*/

import assert = require('assert');
import { PositionAffinity } from 'vs/editor/common/model';
import { ModelDecorationInjectedTextOptions } from 'vs/editor/common/model/textModel';
import { LineBreakData } from 'vs/editor/common/viewModel/viewModel';

suite('Editor ViewModel - LineBreakData', () => {
	test('Basic', () => {
		const data = new LineBreakData([], [], [100], [0], 10);

		assert.strictEqual(data.translateToInputOffset(0, 50), 50);
		assert.strictEqual(data.translateToInputOffset(1, 60), 150);
	});

	function sequence(length: number, start = 0): number[] {
		const result = new Array<number>();
{'fraction_non_alphanumeric': 0.3063787041687594, 'fraction_numerical': 0.017076845806127575, 'mean_word_length': 2.1619047619047618, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 9, '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': '3432829', 'n_tokens_mistral': 509, 'n_tokens_neox': 472, 'n_words': 128}