From fee925505fe3d10bf4ebe890cf8240e443b61c3c Mon Sep 17 00:00:00 2001 From: "Zed A. Shaw" Date: Fri, 20 Mar 2026 12:13:23 -0400 Subject: [PATCH] Dead tests not used anymore. --- tests/amt_matrix.cpp | 74 -------------------------------------------- tests/amt_test.cpp | 74 -------------------------------------------- 2 files changed, 148 deletions(-) delete mode 100644 tests/amt_matrix.cpp delete mode 100644 tests/amt_test.cpp diff --git a/tests/amt_matrix.cpp b/tests/amt_matrix.cpp deleted file mode 100644 index 61fee13..0000000 --- a/tests/amt_matrix.cpp +++ /dev/null @@ -1,74 +0,0 @@ -#include -#include -#include "algos/matrix.hpp" -#include "pixel.hpp" - -using namespace amt; - -int main() { - - auto const format = PixelFormat::abgr; - PixelBuf b(2, 2, RGBA(0x01, 0x02, 0x03, 0x04)); - b[1][1] = HSLA(280, 20, 50, 80); - std::println("{:h}", b); - - - std::uint8_t ps[4 * 4] = {}; - b.copy_to(ps, format); - - /*for (auto i = 0zu; i < sizeof(ps); ++i) {*/ - /* std::println("[{}]: 0x{:0x}", i, ps[i]);*/ - /*}*/ - - PixelBuf test(ps, 2, 2, format); - - for (auto i = 0zu; auto color: test) { - std::println("[{}]: {}", i++, color); - } - - auto m = Matrix{ - {0, 1}, - {3, 4} - }; - - std::println("{}", m); - - - - { - auto ca = RGBA::from_hex(0x333333ff); - auto cb = RGBA::from_hex(0xaabbccff); - std::println("========= RGBA ==========="); - std::println("Normal: 0x{:0x}", ca.blend(cb, BlendMode::normal).to_hex()); - std::println("Multiply: 0x{:0x}", ca.blend(cb, BlendMode::multiply).to_hex()); - std::println("Screen: 0x{:0x}", ca.blend(cb, BlendMode::screen).to_hex()); - std::println("Overlay: 0x{:0x}", ca.blend(cb, BlendMode::overlay).to_hex()); - std::println("darken: 0x{:0x}", ca.blend(cb, BlendMode::darken).to_hex()); - std::println("lighten: 0x{:0x}", ca.blend(cb, BlendMode::lighten).to_hex()); - std::println("Dodge: 0x{:0x}", ca.blend(cb, BlendMode::colorDodge).to_hex()); - std::println("Burn: 0x{:0x}", ca.blend(cb, BlendMode::colorBurn).to_hex()); - std::println("hard light: 0x{:0x}", ca.blend(cb, BlendMode::hardLight).to_hex()); - std::println("soft light: 0x{:0x}", ca.blend(cb, BlendMode::softLight).to_hex()); - std::println("difference: 0x{:0x}", ca.blend(cb, BlendMode::difference).to_hex()); - std::println("exclusion: 0x{:0x}", ca.blend(cb, BlendMode::exclusion).to_hex()); - } - - { - HSLA ca = RGBA::from_hex(0x333333ff); - HSLA cb = RGBA::from_hex(0xaabbccff); - std::println("========= HSLA ==========="); - std::println("Normal: {}", ca.blend(cb, BlendMode::normal)); - std::println("Multiply: {}", ca.blend(cb, BlendMode::multiply)); - std::println("Screen: {}", ca.blend(cb, BlendMode::screen)); - std::println("Overlay: {}", ca.blend(cb, BlendMode::overlay)); - std::println("darken: {}", ca.blend(cb, BlendMode::darken)); - std::println("lighten: {}", ca.blend(cb, BlendMode::lighten)); - std::println("Dodge: {}", ca.blend(cb, BlendMode::colorDodge)); - std::println("Burn: {}", ca.blend(cb, BlendMode::colorBurn)); - std::println("hard light: {}", ca.blend(cb, BlendMode::hardLight)); - std::println("soft light: {}", ca.blend(cb, BlendMode::softLight)); - std::println("difference: {}", ca.blend(cb, BlendMode::difference)); - std::println("exclusion: {}", ca.blend(cb, BlendMode::exclusion)); - } - -} diff --git a/tests/amt_test.cpp b/tests/amt_test.cpp deleted file mode 100644 index 61fee13..0000000 --- a/tests/amt_test.cpp +++ /dev/null @@ -1,74 +0,0 @@ -#include -#include -#include "algos/matrix.hpp" -#include "pixel.hpp" - -using namespace amt; - -int main() { - - auto const format = PixelFormat::abgr; - PixelBuf b(2, 2, RGBA(0x01, 0x02, 0x03, 0x04)); - b[1][1] = HSLA(280, 20, 50, 80); - std::println("{:h}", b); - - - std::uint8_t ps[4 * 4] = {}; - b.copy_to(ps, format); - - /*for (auto i = 0zu; i < sizeof(ps); ++i) {*/ - /* std::println("[{}]: 0x{:0x}", i, ps[i]);*/ - /*}*/ - - PixelBuf test(ps, 2, 2, format); - - for (auto i = 0zu; auto color: test) { - std::println("[{}]: {}", i++, color); - } - - auto m = Matrix{ - {0, 1}, - {3, 4} - }; - - std::println("{}", m); - - - - { - auto ca = RGBA::from_hex(0x333333ff); - auto cb = RGBA::from_hex(0xaabbccff); - std::println("========= RGBA ==========="); - std::println("Normal: 0x{:0x}", ca.blend(cb, BlendMode::normal).to_hex()); - std::println("Multiply: 0x{:0x}", ca.blend(cb, BlendMode::multiply).to_hex()); - std::println("Screen: 0x{:0x}", ca.blend(cb, BlendMode::screen).to_hex()); - std::println("Overlay: 0x{:0x}", ca.blend(cb, BlendMode::overlay).to_hex()); - std::println("darken: 0x{:0x}", ca.blend(cb, BlendMode::darken).to_hex()); - std::println("lighten: 0x{:0x}", ca.blend(cb, BlendMode::lighten).to_hex()); - std::println("Dodge: 0x{:0x}", ca.blend(cb, BlendMode::colorDodge).to_hex()); - std::println("Burn: 0x{:0x}", ca.blend(cb, BlendMode::colorBurn).to_hex()); - std::println("hard light: 0x{:0x}", ca.blend(cb, BlendMode::hardLight).to_hex()); - std::println("soft light: 0x{:0x}", ca.blend(cb, BlendMode::softLight).to_hex()); - std::println("difference: 0x{:0x}", ca.blend(cb, BlendMode::difference).to_hex()); - std::println("exclusion: 0x{:0x}", ca.blend(cb, BlendMode::exclusion).to_hex()); - } - - { - HSLA ca = RGBA::from_hex(0x333333ff); - HSLA cb = RGBA::from_hex(0xaabbccff); - std::println("========= HSLA ==========="); - std::println("Normal: {}", ca.blend(cb, BlendMode::normal)); - std::println("Multiply: {}", ca.blend(cb, BlendMode::multiply)); - std::println("Screen: {}", ca.blend(cb, BlendMode::screen)); - std::println("Overlay: {}", ca.blend(cb, BlendMode::overlay)); - std::println("darken: {}", ca.blend(cb, BlendMode::darken)); - std::println("lighten: {}", ca.blend(cb, BlendMode::lighten)); - std::println("Dodge: {}", ca.blend(cb, BlendMode::colorDodge)); - std::println("Burn: {}", ca.blend(cb, BlendMode::colorBurn)); - std::println("hard light: {}", ca.blend(cb, BlendMode::hardLight)); - std::println("soft light: {}", ca.blend(cb, BlendMode::softLight)); - std::println("difference: {}", ca.blend(cb, BlendMode::difference)); - std::println("exclusion: {}", ca.blend(cb, BlendMode::exclusion)); - } - -}