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:
parent
947a1f2c65
commit
c3548c9413
@ -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 {}
|
||||
}
|
||||
|
||||
|
@ -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 {}
|
||||
}
|
||||
|
||||
|
@ -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()
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user