From 8fce9c34f808380f7afe9da75742da309cdacc14 Mon Sep 17 00:00:00 2001 From: Mark Overholser Date: Sun, 23 Feb 2025 16:19:12 -0600 Subject: [PATCH] Fix tests in to_count to reflect appropriate function; add tests for 0x-formatted hex values for to_count and to_int --- testing/btest/bifs/to_count.zeek | 7 ++++--- testing/btest/bifs/to_int.zeek | 1 + 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/testing/btest/bifs/to_count.zeek b/testing/btest/bifs/to_count.zeek index ae90bc157a..cda4ab432c 100644 --- a/testing/btest/bifs/to_count.zeek +++ b/testing/btest/bifs/to_count.zeek @@ -19,9 +19,10 @@ event zeek_init() print to_count("7"); print to_count(""); print to_count("-5"); - print to_int("10101100", 2); - print to_int("43", 8); - print to_int("C3", 16); + print to_count("10101100", 2); + print to_count("43", 8); + print to_count("C3", 16); + print to_count("0xC3", 16); print to_count("not a count"); local e: port = 123/tcp; diff --git a/testing/btest/bifs/to_int.zeek b/testing/btest/bifs/to_int.zeek index 42dea4f619..c8df54eefc 100644 --- a/testing/btest/bifs/to_int.zeek +++ b/testing/btest/bifs/to_int.zeek @@ -9,6 +9,7 @@ event zeek_init() print to_int("10111100", 2); print to_int("47", 8); print to_int("F3", 16); + print to_int("0xF3", 16); print to_int("4294967296"); print to_int("not an int");