Sparse Virtual File System  0.4.1
A Sparse Virtual File System.
Namespaces | Macros | Functions | Variables
test_svf.cpp File Reference
#include <iostream>
#include <iomanip>
#include <thread>
#include "test_svf.h"

Go to the source code of this file.

Namespaces

 SVFS
 The namespace for all svfsc code.
 
 SVFS::Test
 The namespace for all the Test code in svfsc code.
 

Macros

#define INCLUDE_TESTS   1
 

Functions

void test_example_code (void)
 
TestCount SVFS::Test::test_write_all (t_test_results &results)
 
TestCount SVFS::Test::test_write_all_throws (t_test_results &results)
 
TestCount SVFS::Test::_test_perf_write_with_diff_check (bool compare_for_diff, t_test_results &results)
 
TestCount SVFS::Test::test_perf_write_with_diff_check (t_test_results &results)
 
TestCount SVFS::Test::test_perf_write_without_diff_check (t_test_results &results)
 
TestCount SVFS::Test::test_perf_write_sim_index_svf (t_test_results &results)
 
TestCount SVFS::Test::test_perf_write_1M_coalesced (t_test_results &results)
 
TestCount SVFS::Test::test_perf_write_1M_uncoalesced (t_test_results &results)
 
TestCount SVFS::Test::test_perf_write_1M_uncoalesced_size_of (t_test_results &results)
 
TestCount SVFS::Test::test_read_all (t_test_results &results)
 
TestCount SVFS::Test::test_read_throws_all (t_test_results &results)
 
TestCount SVFS::Test::test_perf_read_1M_coalesced (t_test_results &results)
 
TestCount SVFS::Test::test_perf_read_1M_un_coalesced (t_test_results &results)
 
TestCount SVFS::Test::test_has_all (t_test_results &results)
 
TestCount SVFS::Test::test_need_all (t_test_results &results)
 
TestCount SVFS::Test::_test_perf_need_sim_index (size_t need_size, t_test_results &results)
 
TestCount SVFS::Test::test_perf_need_sim_index (t_test_results &results)
 
TestCount SVFS::Test::test_need_greedy_all (t_test_results &results)
 
TestCount SVFS::Test::test_erase_all (t_test_results &results)
 
TestCount SVFS::Test::test_erase_throws_all (t_test_results &results)
 
TestCount SVFS::Test::_test_perf_erase_overwrite (bool overwrite, t_test_results &results)
 
TestCount SVFS::Test::test_perf_erase_overwrite_false (t_test_results &results)
 
TestCount SVFS::Test::test_perf_erase_overwrite_true (t_test_results &results)
 
void SVFS::Test::_write_multithreaded_coalesced ()
 
void SVFS::Test::_write_multithreaded_un_coalesced ()
 
TestCount SVFS::Test::test_write_multithreaded (int num_threads, bool is_coalesced, t_test_results &results)
 
TestCount SVFS::Test::test_write_multithreaded_coalesced (t_test_results &results)
 
TestCount SVFS::Test::test_write_multithreaded_un_coalesced (t_test_results &results)
 
TestResult SVFS::Test::test_debug_need_read_special_A ()
 
TestResult SVFS::Test::test_debug_need_read_special_B ()
 
TestResult SVFS::Test::test_debug_need_read_special_C ()
 This is special test created to check the problem reading TUPAC-TR-004.svs. More...
 
TestCount SVFS::Test::test_block_size (t_test_results &results)
 
TestCount SVFS::Test::test_block_size_throws (t_test_results &results)
 
TestCount SVFS::Test::test_block_touch_single_block (t_test_results &results)
 
TestCount SVFS::Test::test_block_touch_single_block_read_updates (t_test_results &results)
 
TestCount SVFS::Test::test_block_touch_two_blocks (t_test_results &results)
 
TestCount SVFS::Test::test_block_touch_coalesced (t_test_results &results)
 
TestCount SVFS::Test::test_lru_block_punting_a (t_test_results &results)
 
TestCount SVFS::Test::test_lru_block_punting_b (t_test_results &results)
 
TestCount SVFS::Test::test_lru_block_punting_c (t_test_results &results)
 
TestCount SVFS::Test::test_needs_many_empty (t_test_results &results)
 
TestCount SVFS::Test::test_needs_many_empty_overlap (t_test_results &results)
 
TestCount SVFS::Test::test_needs_many_empty_greedy_length (t_test_results &results)
 
TestCount SVFS::Test::test_needs_many_one_block (t_test_results &results)
 
TestCount SVFS::Test::test_needs_many_one_block_greedy (t_test_results &results)
 
TestCount SVFS::Test::test_erase_updates_counters (t_test_results &results)
 
TestCount SVFS::Test::test_erase_updates_counters_not_punt (t_test_results &results)
 
TestCount SVFS::Test::test_punt_updates_counters (t_test_results &results)
 
TestCount SVFS::Test::test_svf_all (t_test_results &results)
 

Variables

const std::vector< TestCaseWrite > SVFS::Test::write_test_cases
 The actual write tests cases. More...
 
const std::vector< TestCaseWrite > SVFS::Test::write_test_cases_special
 
const std::vector< TestCaseWriteThrows > SVFS::Test::write_test_cases_throws
 
const std::vector< TestCaseRead > SVFS::Test::read_test_cases
 
const std::vector< TestCaseRead > SVFS::Test::read_test_cases_special
 
const std::vector< TestCaseReadThrows > SVFS::Test::read_test_cases_throw
 
const std::vector< TestCaseHas > SVFS::Test::has_test_cases
 
const std::vector< TestCaseNeed > SVFS::Test::need_test_cases
 
const std::vector< TestCaseNeed > SVFS::Test::need_test_cases_special
 
const std::vector< TestCaseNeedGreedy > SVFS::Test::need_greedy_test_cases
 
const std::vector< TestCaseErase > SVFS::Test::erase_test_cases
 
const std::vector< TestCaseEraseThrows > SVFS::Test::erase_test_cases_throw
 
SparseVirtualFile SVFS::Test::g_svf_multithreaded ("", 0.0)
 

Detailed Description

A Sparse Virtual File implementation.

Created by Paul Ross on 2020-01-22.

   MIT License

   Copyright (c) 2020-2025 Paul Ross

   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.

Definition in file test_svf.cpp.

Macro Definition Documentation

◆ INCLUDE_TESTS

#define INCLUDE_TESTS   1

Definition at line 1947 of file test_svf.cpp.

Function Documentation

◆ test_example_code()

void test_example_code ( void  )

Check that the basic code examples compiles and runs.

Definition at line 40 of file test_svf.cpp.