Team Ai
Datasetpublic

Brunobkr/llama.cpp_AlgMor24_github

ΩFFFΣLLIa • llama.cpp • AlgMor24 ██████╗ ███████╗███████╗███████╗██╗ ██╗ ██╗ █████╗ ██╔═══██╗██╔════╝██╔════╝██╔════╝██║ ██║ ██║██╔══██╗ ██║ ██║█████╗ █████╗ █████╗ ██║ ██║ ██║███████║ ██║ ██║██╔══╝ ██╔══╝ ██╔══╝ ██║ ██║ ██║██╔══██║ ╚██████╔╝██║ ██║ ███████╗███████╗███████╗██║██║ ██║ ╚═════╝ ╚═╝ ╚═╝ ╚══════╝╚══════╝╚══════╝╚═╝╚═╝ ╚═╝ High-Performance LLM / VLM Inference & Autonomous Agentic Ecosystem… See the full description on the dataset page: https://huggingface.co/datasets/Brunobkr/llama.cpp_AlgMor24_github.

sourceHugging Faceupdated 2mo agoView on Hugging Face
0likes3kdownloads
utils.test.js64 linesDownload Raw Back to src
1import * as assert from 'uvu/assert';2import { suite } from 'uvu';3import { valid_array_indices } from './utils.js';4 5const test = suite('valid_array_indices');6 7test('returns all indices for a normal dense array', () => {8	const arr = ['a', 'b', 'c'];9	assert.equal(valid_array_indices(arr), ['0', '1', '2']);10});11 12test('returns empty array for an empty array', () => {13	assert.equal(valid_array_indices([]), []);14});15 16test('returns populated indices for a sparse array', () => {17	const arr = [, 'b', ,];18	assert.equal(valid_array_indices(arr), ['1']);19});20 21test('strips non-numeric properties from a dense array', () => {22	const arr = ['a', 'b'];23	arr.foo = 'x';24	arr.bar = 42;25	assert.equal(valid_array_indices(arr), ['0', '1']);26});27 28test('strips non-numeric properties from a very sparse array', () => {29	const arr = [];30	arr[1_000_000] = 'x';31	arr.foo = 'should be ignored';32	assert.equal(valid_array_indices(arr), ['1000000']);33});34 35test('returns empty array when only non-numeric properties exist', () => {36	const arr = [];37	arr.foo = 'x';38	arr.bar = 42;39	assert.equal(valid_array_indices(arr), []);40});41 42test('handles multiple non-numeric properties after indices', () => {43	const arr = [1, 2, 3];44	arr.a = 'x';45	arr.b = 'y';46	arr.c = 'z';47	assert.equal(valid_array_indices(arr), ['0', '1', '2']);48});49 50test('handles a single-element array with non-numeric property', () => {51	const arr = ['only'];52	arr.extra = true;53	assert.equal(valid_array_indices(arr), ['0']);54});55 56test('handles array properties pretending to be indices', () => {57	const arr = ['a', 'b'];58	arr[-1] = 'negative index';59	arr[2 ** 32 - 1] = 'too large index';60	assert.equal(valid_array_indices(arr), ['0', '1']);61});62 63test.run();64 
Brunobkr/llama.cpp_AlgMor24_github · Team Ai