[test_buffer]
use target and actual checks
This commit is contained in:
@@ -1,8 +1,9 @@
|
||||
#include <delay/buffer_multi.hpp>
|
||||
#include <delay/buffer.hpp>
|
||||
#include <cstdio>
|
||||
|
||||
#include <assert.h>
|
||||
#include <iostream>
|
||||
#include <ostream>
|
||||
|
||||
#ifndef TEST_COMMON_H
|
||||
#define TEST_COMMON_H
|
||||
@@ -20,8 +21,14 @@ void print(const dsp::Buffer<T> &v, size_t size, std::string name=std::string(""
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
bool check(const dsp::Buffer<T> &target, const dsp::Buffer<T> &actual)
|
||||
void check(const dsp::Buffer<T> &target, const dsp::Buffer<T> &actual)
|
||||
{
|
||||
if (!(target == actual))
|
||||
{
|
||||
std::cout << "Check failed" << std::endl;
|
||||
print(target, target.capacity(), "Target");
|
||||
print(actual, actual.capacity(), "Actual");
|
||||
}
|
||||
assert(target == actual);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user