TwITe

Untitled

Oct 9th, 2017
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.56 KB | None | 0 0
  1. TEST_CASE("Data was succesfully writed to files", "[data_store]") {
  2.     set_path("C:/Users/TwITe/Documents/Visual Studio 2017/Projects/Database/Data_files/");
  3.     set_data_file_size(5);
  4.     int arr[5]{ 0, 1, 2, 3, 4 };
  5.     REQUIRE(write_data(1, arr, 20) == true);
  6. }
  7.  
  8. TEST_CASE("Data was succesfully deleted", "[data_delete]") {
  9.     set_path("C:/Users/TwITe/Documents/Visual Studio 2017/Projects/Database/Data_files/");
  10.     set_data_file_size(5);
  11.     int arr[5]{ 0, 1, 2, 3, 4 };
  12.     int id = 1;
  13.     write_data(id, arr, 20);
  14.     delete_data(id);
  15.     REQUIRE(indexes[id].deleted == true);
  16. }
Advertisement
Add Comment
Please, Sign In to add comment