/* * Author: Sven Gothel * Copyright (c) 2020 Gothel Software e.K. * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ #include #include #include #include #include #include "test_lfringbuffer_a.hpp" using namespace jau; typedef jau::snsize_t Integral_type; typedef std::array Value_type; template<> Value_type getDefault() { return Value_type{-1, -1, -1, -1, -1, -1}; } template<> Value_type createValue(const Integral_type& v) { return Value_type{v, v+1, v+2, v+3, v+4, v+5}; } template<> Integral_type getValue(const Value_type& e) { return e[0]; } TEST_CASE( "TestRingbuffer_A_04_a, Size_type=jau::nsize_t, exp_memmove=true, exp_memcpy=true, exp_secmem=false>", "[ringbuffer]" ) { PerformRingbufferTests(); } TEST_CASE( "TestRingbuffer_A_04_b, Size_type=jau::nsize_t, exp_memmove=true, exp_memcpy=true, exp_secmem=true>", "[ringbuffer]" ) { PerformRingbufferTests(); } TEST_CASE( "TestRingbuffer_A_04_c, Size_type=jau::nsize_t, exp_memmove=false, exp_memcpy=false, exp_secmem=true>", "[ringbuffer]" ) { PerformRingbufferTests(); }