-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add approvaltests to linux clang build
- Loading branch information
1 parent
3e48025
commit 38987f0
Showing
6 changed files
with
35 additions
and
8 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
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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#include "approval_test_helpers.hpp" | ||
#include <algorithm> | ||
|
||
std::vector<int> ApprovalTestHelpers::asInt(std::vector<float> const& numbers, unsigned int digits) | ||
{ | ||
std::vector<int> numbersAsInts; | ||
numbersAsInts.resize(numbers.size()); | ||
std::transform(numbers.cbegin(), numbers.cend(), numbersAsInts.begin(), [digits](float number) | ||
{return static_cast<int>(number * digits);}); | ||
return numbersAsInts; | ||
} |
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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#ifndef OPENALPP_APPROVAL_TEST_HELPERS_HPP | ||
#define OPENALPP_APPROVAL_TEST_HELPERS_HPP | ||
#include <vector> | ||
|
||
struct ApprovalTestHelpers { | ||
static std::vector<int> ApprovalTestHelpers::asInt(std::vector<float> const& number, unsigned int digits); | ||
}; | ||
|
||
#endif // OPENALPP_APPROVAL_TEST_HELPERS_HPP |
4 changes: 2 additions & 2 deletions
4
test/approval_tests/approval_tests/effect_convolution_test.convolution.approved.txt
Git LFS file not shown
3 changes: 0 additions & 3 deletions
3
test/approval_tests/approval_tests/effect_phase_flip_test.phase_flip.received.txt
This file was deleted.
Oops, something went wrong.
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