mirror of
https://github.com/aaru-dps/Aaru.Checksums.Native.git
synced 2025-12-16 11:14:29 +00:00
Fix tests path.
This commit is contained in:
@@ -2,10 +2,11 @@
|
||||
// Created by claunia on 5/10/21.
|
||||
//
|
||||
|
||||
#include <climits>
|
||||
#include <cstdint>
|
||||
|
||||
#include "../crc16_ccitt.h"
|
||||
#include "../library.h"
|
||||
#include "../crc16_ccitt.h"
|
||||
#include "gtest/gtest.h"
|
||||
|
||||
#define EXPECTED_CRC16_CCITT 0x3640
|
||||
@@ -24,7 +25,13 @@ class crc16_ccittFixture : public ::testing::Test
|
||||
protected:
|
||||
void SetUp()
|
||||
{
|
||||
FILE* file = fopen("/home/claunia/random", "rb");
|
||||
char path[PATH_MAX];
|
||||
char filename[PATH_MAX];
|
||||
|
||||
getcwd(path, PATH_MAX);
|
||||
snprintf(filename, PATH_MAX, "%s/data/random", path);
|
||||
|
||||
FILE* file = fopen(filename, "rb");
|
||||
buffer = (const uint8_t*)malloc(1048576);
|
||||
fread((void*)buffer, 1, 1048576, file);
|
||||
fclose(file);
|
||||
|
||||
Reference in New Issue
Block a user