mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
Use a Printable struct for ansi rgb formatting instead of explicit allocations (#2696)
* Use a `Printable` struct for ansi rgb formatting * update release notes * Some renaming. --------- Co-authored-by: Christoffer Lerno <christoffer@aegik.com>
This commit is contained in:
@@ -18,8 +18,9 @@ fn void test_color()
|
||||
test::eq("\u001B[48;2;255;204;255m", ansi::color(0xFFCCFF, true));
|
||||
}
|
||||
|
||||
fn void test_make_color()
|
||||
fn void test_get_color()
|
||||
{
|
||||
test::eq("\u001B[38;2;255;204;255m", ansi::make_color(tmem, 0xFFCCFF));
|
||||
test::eq("\u001B[48;2;255;204;255m", ansi::make_color(tmem, 0xFFCCFF, true));
|
||||
test::eq("\u001B[38;2;255;204;254m", string::tformat("%s", ansi::get_color_rgb(0xFF, 0xCC, 0xFE)));
|
||||
test::eq("\u001B[38;2;255;204;254m", string::tformat("%s", ansi::get_color(0xFFCCFE)));
|
||||
test::eq("\u001B[48;2;255;204;254m", string::tformat("%s", ansi::get_color(0xFFCCFE, true)));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user