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