Started on FileSystem format.
This commit is contained in:
@@ -1,8 +1,13 @@
|
||||
cmake_minimum_required(VERSION 2.8)
|
||||
|
||||
add_executable(
|
||||
Format
|
||||
format.cpp
|
||||
FileStoreFormat
|
||||
filestore_format.cpp
|
||||
)
|
||||
|
||||
add_executable(
|
||||
FileSystemFormat
|
||||
filesystem_format.cpp
|
||||
)
|
||||
|
||||
add_executable(
|
||||
@@ -10,8 +15,10 @@ add_executable(
|
||||
filestoreio.cpp
|
||||
)
|
||||
|
||||
target_link_libraries(Format OxFS OxStd)
|
||||
target_link_libraries(FileStoreFormat OxFS OxStd)
|
||||
target_link_libraries(FileSystemFormat OxFS OxStd)
|
||||
target_link_libraries(FileStoreIO OxFS OxStd)
|
||||
|
||||
add_test("Format" Format)
|
||||
add_test("FileStoreFormat" FileStoreFormat)
|
||||
add_test("FileSystemFormat" FileSystemFormat)
|
||||
add_test("FileStoreIO" FileStoreIO)
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
/*
|
||||
* Copyright 2015 - 2016 gtalent2@gmail.com
|
||||
*
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
*/
|
||||
#include <ox/fs/filesystem.hpp>
|
||||
|
||||
using namespace ox::fs;
|
||||
|
||||
template<typename FileSystem>
|
||||
int test() {
|
||||
const auto size = 65535;
|
||||
uint8_t volume[size];
|
||||
FileSystem::format(volume, size);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int main() {
|
||||
return test<FileSystem16>() | test<FileSystem32>() | test<FileSystem64>();
|
||||
}
|
||||
Reference in New Issue
Block a user