libutil

C Utility Library
git clone http://git.omkov.net/libutil
Log | Tree | Refs | README | LICENCE | Download

AuthorJamozed <[email protected]>
Date2021-02-20 07:37:56
Commit7bc6501c03f7c99c9d63262bde32ab5f8ea0edd1
Parent346e60fbca65f09bb0a38db84cb3237d3da935e9

base32: Remove redundant unit tests

Diffstat

M src/test/test_base32.c | 61 ++++++++++---------------------------------------------------

1 files changed, 10 insertions, 51 deletions

diff --git a/src/test/test_base32.c b/src/test/test_base32.c
index c7464b6..72feac3 100644
--- a/src/test/test_base32.c
+++ b/src/test/test_base32.c
@@ -75,53 +75,8 @@ int main(void) {
 	}
 
 	{
-		uint8_t i[10] =
-			{ 0xCA, 0x2C, 0x10, 0x9B, 0x54, 0xD1, 0x20, 0xBE, 0xCD, 0x1B };
-		uint8_t o[16] = { 0 };
-		
-		b32encode(o, i, 1);
-		ASSERT("T011 ENCODE RANDOM DATA LENGTH 1",
-				!memcmp(o, "ZI======", 8));
-		
-		b32encode(o, i, 2);
-		ASSERT("T012 ENCODE RANDOM DATA LENGTH 2",
-				!memcmp(o, "ZIWA====", 8));
-		
-		b32encode(o, i, 3);
-		ASSERT("T013 ENCODE RANDOM DATA LENGTH 3",
-				!memcmp(o, "ZIWBA===", 8));
-		
-		b32encode(o, i, 4);
-		ASSERT("T014 ENCODE RANDOM DATA LENGTH 4",
-				!memcmp(o, "ZIWBBGY=", 8));
-		
-		b32encode(o, i, 5);
-		ASSERT("T015 ENCODE RANDOM DATA LENGTH 5",
-				!memcmp(o, "ZIWBBG2U", 8));
-		
-		b32encode(o, i, 6);
-		ASSERT("T016 ENCODE RANDOM DATA LENGTH 6",
-				!memcmp(o, "ZIWBBG2U2E======", 16));
-		
-		b32encode(o, i, 7);
-		ASSERT("T017 ENCODE RANDOM DATA LENGTH 7",
-				!memcmp(o, "ZIWBBG2U2EQA====", 16));
-		
-		b32encode(o, i, 8);
-		ASSERT("T018 ENCODE RANDOM DATA LENGTH 8",
-				!memcmp(o, "ZIWBBG2U2EQL4===", 16));
-		
-		b32encode(o, i, 9);
-		ASSERT("T019 ENCODE RANDOM DATA LENGTH 9",
-				!memcmp(o, "ZIWBBG2U2EQL5TI=", 16));
-		
-		b32encode(o, i, 10);
-		ASSERT("T020 ENCODE RANDOM DATA LENGTH 10",
-				!memcmp(o, "ZIWBBG2U2EQL5TI3", 16));
-	}
-	
-	{
-		uint8_t i[16] = "GEZDGNBVGY3TQOJQ"; uint8_t o[10] = { 0 };
+		uint8_t i[16] = "GEZDGNBVGY3TQOJQ";
+		uint8_t o[10] = { 0 };
 
 		b32decode(o, i, 8);
 		ASSERT("T021 DECODE STRING LENGTH 8",
@@ -133,7 +88,8 @@ int main(void) {
 	}
 
 	{
-		uint8_t i[16] = "GEZDGNBVGY======"; uint8_t o[10] = { 0 };
+		uint8_t i[16] = "GEZDGNBVGY======";
+		uint8_t o[10] = { 0 };
 
 		b32decode(o, i, 10);
 		ASSERT("T023 DECODE STRING LENGTH 10",
@@ -145,7 +101,8 @@ int main(void) {
 	}
 
 	{
-		uint8_t i[16] = "GEZDGNBVGY3Q===="; uint8_t o[10] = { 0 };
+		uint8_t i[16] = "GEZDGNBVGY3Q====";
+		uint8_t o[10] = { 0 };
 
 		b32decode(o, i, 12);
 		ASSERT("T025 DECODE STRING LENGTH 12",
@@ -157,7 +114,8 @@ int main(void) {
 	}
 
 	{
-		uint8_t i[16] = "GEZDGNBVGY3TQ==="; uint8_t o[10] = { 0 };
+		uint8_t i[16] = "GEZDGNBVGY3TQ===";
+		uint8_t o[10] = { 0 };
 
 		b32decode(o, i, 13);
 		ASSERT("T027 DECODE STRING LENGTH 13",
@@ -169,7 +127,8 @@ int main(void) {
 	}
 
 	{
-		uint8_t i[16] = "GEZDGNBVGY3TQOI="; uint8_t o[10] = { 0 };
+		uint8_t i[16] = "GEZDGNBVGY3TQOI=";
+		uint8_t o[10] = { 0 };
 
 		b32decode(o, i, 15);
 		ASSERT("T029 DECODE STRING LENGTH 13",