1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

tests: omit testsuite_begin/end() optional (#15871)

This commit is contained in:
yuyi 2022-09-25 15:29:25 +08:00 committed by GitHub
parent 947a1f2c65
commit c3548c9413
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 6 deletions

View File

@ -4,7 +4,7 @@ const tfolder = os.join_path(os.temp_dir(), 'v', 'tests', 'os_file_test')
const tfile = os.join_path_single(tfolder, 'test_file')
fn testsuite_begin() ? {
fn testsuite_begin() {
os.rmdir_all(tfolder) or {}
assert !os.is_dir(tfolder)
os.mkdir_all(tfolder)?
@ -12,7 +12,7 @@ fn testsuite_begin() ? {
assert os.is_dir(tfolder)
}
fn testsuite_end() ? {
fn testsuite_end() {
os.rmdir_all(tfolder) or {}
}

View File

@ -11,7 +11,7 @@ const (
test_os_process_source = os.join_path(vroot, 'cmd/tools/test_os_process.v')
)
fn testsuite_begin() ? {
fn testsuite_begin() {
os.rmdir_all(tfolder) or {}
os.mkdir_all(tfolder)?
if os.getenv('WINE_TEST_OS_PROCESS_EXE') != '' {
@ -26,7 +26,7 @@ fn testsuite_begin() ? {
assert os.exists(test_os_process)
}
fn testsuite_end() ? {
fn testsuite_end() {
os.rmdir_all(tfolder) or {}
}

View File

@ -32,11 +32,11 @@ fn cleanup() {
os.rm(test_dir_zip) or {}
}
fn testsuite_begin() ? {
fn testsuite_begin() {
cleanup()
}
fn testsuite_end() ? {
fn testsuite_end() {
cleanup()
}