-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Matthew Johnson <[email protected]>
- Loading branch information
Showing
18 changed files
with
618 additions
and
682 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,7 +22,7 @@ jobs: | |
- name: Run clang-format style check | ||
uses: jidicula/[email protected] | ||
with: | ||
clang-format-version: '13' | ||
clang-format-version: '18' | ||
check-path: ${{matrix.path['check']}} | ||
exclude-regex: ${{matrix.path['exclude']}} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,4 +35,5 @@ | |
.vscode | ||
build* | ||
assets/test/*_large*.npz | ||
.cache | ||
.cache | ||
.env |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,25 @@ | ||
#include <cstdint> | ||
#include <fstream> | ||
#include <sstream> | ||
#include <cstdint> | ||
|
||
#include "libnpy_tests.h" | ||
#include "zip.h" | ||
|
||
const static int BUF_SIZE = 4096; | ||
|
||
int test_crc32() | ||
{ | ||
int result = EXIT_SUCCESS; | ||
std::ifstream stream(test::asset_path("float32.npy"), std::ios_base::in | std::ios_base::binary); | ||
char buffer[BUF_SIZE]; | ||
std::vector<std::uint8_t> bytes; | ||
while(stream.good()) | ||
{ | ||
stream.read(buffer, BUF_SIZE); | ||
std::copy(buffer, buffer + stream.gcount(), std::back_inserter(bytes)); | ||
} | ||
int test_crc32() { | ||
int result = EXIT_SUCCESS; | ||
std::ifstream stream(test::asset_path("float32.npy"), | ||
std::ios_base::in | std::ios_base::binary); | ||
char buffer[BUF_SIZE]; | ||
std::vector<std::uint8_t> bytes; | ||
while (stream.good()) { | ||
stream.read(buffer, BUF_SIZE); | ||
std::copy(buffer, buffer + stream.gcount(), std::back_inserter(bytes)); | ||
} | ||
|
||
int actual = npy::npy_crc32(bytes); | ||
int expected = 928602993; | ||
test::assert_equal(expected, actual, result, "crc32"); | ||
return result; | ||
int actual = npy::npy_crc32(bytes); | ||
int expected = 928602993; | ||
test::assert_equal(expected, actual, result, "crc32"); | ||
return result; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.