Add unit tests for Utils::toHex
This commit is contained in:
13
test/mocks/AES.h
Normal file
13
test/mocks/AES.h
Normal file
@@ -0,0 +1,13 @@
|
||||
#pragma once
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stddef.h>
|
||||
|
||||
// Mock AES128 class for testing
|
||||
// Provides minimal interface to allow Utils.cpp to compile
|
||||
class AES128 {
|
||||
public:
|
||||
void setKey(const uint8_t* key, size_t keySize) {}
|
||||
void encryptBlock(uint8_t* output, const uint8_t* input) {}
|
||||
void decryptBlock(uint8_t* output, const uint8_t* input) {}
|
||||
};
|
||||
14
test/mocks/SHA256.h
Normal file
14
test/mocks/SHA256.h
Normal file
@@ -0,0 +1,14 @@
|
||||
#pragma once
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stddef.h>
|
||||
|
||||
// Mock SHA256 class for testing
|
||||
// Provides minimal interface to allow Utils.cpp to compile
|
||||
class SHA256 {
|
||||
public:
|
||||
void update(const uint8_t* data, size_t len) {}
|
||||
void finalize(uint8_t* hash, size_t hashLen) {}
|
||||
void resetHMAC(const uint8_t* key, size_t keyLen) {}
|
||||
void finalizeHMAC(const uint8_t* key, size_t keyLen, uint8_t* hash, size_t hashLen) {}
|
||||
};
|
||||
10
test/mocks/Stream.h
Normal file
10
test/mocks/Stream.h
Normal file
@@ -0,0 +1,10 @@
|
||||
#pragma once
|
||||
|
||||
// Mock Stream class for native testing
|
||||
// Provides minimal interface needed by Utils.h
|
||||
|
||||
class Stream {
|
||||
public:
|
||||
virtual void print(char c) {}
|
||||
virtual void print(const char* str) {}
|
||||
};
|
||||
Reference in New Issue
Block a user