Add custom fseek and fread
Add test framework gtest and added my custom fread and fseek tests + functions
This commit is contained in:
2023-11-12 14:33:15 +01:00
committed by Sander Speetjens
parent d436447a21
commit 7c76a37ec9
7 changed files with 212 additions and 8 deletions

17
tests/tftp.hpp Normal file
View File

@@ -0,0 +1,17 @@
#pragma once
#include <stdint.h>
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <iostream>
typedef struct tftp_custom_file_s {
const char* data;
size_t len;
char*name;
size_t ofset;
}tftp_custom_file_t;
void tftp_custom_fseek(tftp_custom_file_t* handle, size_t offset, int whence);
size_t tftp_custom_fread(void* buf, size_t bytes, tftp_custom_file_t* handle);