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.
03.1k
1 2/* IMPORT */3 4import {describe} from 'fava';5import {adjust} from '../../dist/index.js';6import Color from '../../dist/color/index.js';7 8/* MAIN */9 10describe ( 'adjust', it => {11 12 it ( 'increases or decreases the value of any RGB channel of the color', t => {13 14 const tests = [15 [['rgb(0, 0, 0)', { r: 100 }], 'rgb(100, 0, 0)'],16 [['rgb(0, 0, 0)', { g: 100 }], 'rgb(0, 100, 0)'],17 [['rgb(0, 0, 0)', { b: 100 }], 'rgb(0, 0, 100)'],18 [['rgb(0, 0, 0)', { r: 100, g: 100 }], 'rgb(100, 100, 0)'],19 [['rgb(0, 0, 0)', { r: 100, g: 100, b: 100 }], 'rgb(100, 100, 100)'],20 [['rgb(255, 255, 255)', { r: -100 }], 'rgb(155, 255, 255)'],21 [['rgb(255, 255, 255)', { g: -100 }], 'rgb(255, 155, 255)'],22 [['rgb(255, 255, 255)', { b: -100 }], 'rgb(255, 255, 155)'],23 [['rgb(200, 0, 0)', { r: 100 }], 'rgb(255, 0, 0)'],24 [['rgb(100, 0, 0)', { r: -200 }], 'rgb(0, 0, 0)']25 ];26 27 tests.forEach ( ([ args, output ]) => {28 t.is ( Color.format.rgb.stringify ( Color.parse ( adjust ( ...args ) ) ), output );29 });30 31 });32 33 it ( 'increases or decreases the value of any HSL channel of the color', t => {34 35 const tests = [36 [['hsl(0, 50%, 50%)', { h: 100 }], 'hsl(100, 50%, 50%)'],37 [['hsl(0, 50%, 50%)', { s: 25 }], 'hsl(0, 75%, 50%)'],38 [['hsl(0, 50%, 50%)', { l: 25 }], 'hsl(0, 50%, 75%)'],39 [['hsl(0, 50%, 50%)', { h: 100, s: 25 }], 'hsl(100, 75%, 50%)'],40 [['hsl(0, 50%, 50%)', { h: 100, s: 25, l: 25 }], 'hsl(100, 75%, 75%)'],41 [['hsl(100, 50%, 50%)', { h: -100 }], 'hsl(0, 50%, 50%)'],42 [['hsl(0, 50%, 50%)', { s: -25 }], 'hsl(0, 25%, 50%)'],43 [['hsl(0, 50%, 50%)', { l: -25 }], 'hsl(0, 50%, 25%)'],44 [['hsl(300, 50%, 50%)', { h: 100 }], 'hsl(40, 50%, 50%)'],45 [['hsl(0, 50%, 50%)', { h: -100 }], 'hsl(-100, 50%, 50%)'],46 [['hsl(0, 100%, 50%)', { s: 25 }], 'hsl(0, 100%, 50%)'],47 [['hsl(0, 0%, 50%)', { s: -25 }], 'hsl(0, 0%, 50%)'],48 [['hsla(0, 0%, 50%, .5)', { s: -25 }], 'hsla(0, 0%, 50%, 0.5)']49 ];50 51 tests.forEach ( ([ args, output ]) => {52 t.is ( Color.format.hsl.stringify ( Color.parse ( adjust ( ...args ) ) ), output );53 });54 55 });56 57 it ( 'increases or decreases the value of the alpha channel of the color', t => {58 59 const tests = [60 [['rgba(0, 0, 0, 0)', { a: 0.5 }], 'rgba(0, 0, 0, 0.5)'],61 [['hsla(0, 0%, 0%, 0)', { a: 0.5 }], 'hsla(0, 0%, 0%, 0.5)'],62 [['rgba(0, 0, 0, 0)', { a: 1 }], '#000000'],63 [['rgba(0, 0, 0, 1)', { a: -0.5 }], 'rgba(0, 0, 0, 0.5)'],64 [['rgba(0, 0, 0, 1)', { a: -1 }], 'rgba(0, 0, 0, 0)'],65 [['rgba(0, 0, 0, 0.5)', { a: 1 }], '#000000'],66 [['rgba(0, 0, 0, 0.5)', { a: -1 }], 'rgba(0, 0, 0, 0)']67 ];68 69 tests.forEach ( ([ args, output ]) => {70 t.is ( adjust ( ...args ), output );71 });72 73 });74 75 it ( 'throws when setting RGB and HSL channels at the same time', t => {76 77 const tests = [78 ['#000', { r: 10, h: 10 }],79 ['#000', { g: 10, l: 10 }],80 ['#000', { b: 10, s: 10 }]81 ];82 83 tests.forEach ( args => {84 t.throws ( () => adjust ( ...args ), /cannot.*at the same time/i );85 });86 87 });88 89});90 