tests: split vlib/v/tests/ into several subfolders, to mitigate github limits for number of files in a folder (#22158)

This commit is contained in:
Delyan Angelov 2024-09-04 09:38:09 +03:00 committed by GitHub
parent 99bfb5b0fc
commit 6488041a74
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1234 changed files with 124 additions and 16 deletions

View File

@ -176,7 +176,7 @@ jobs:
- name: Build blog tutorial with -autofree
run: v -autofree -o blog tutorials/building_a_simple_web_blog_with_vweb/code/blog
- name: Build option_test.c.v with -autofree
run: v -autofree vlib/v/tests/option_test.c.v
run: v -autofree vlib/v/tests/options/option_test.c.v
- name: V self compilation with -parallel-cc
run: |
v -o v2 -parallel-cc cmd/v

View File

@ -62,7 +62,7 @@ jobs:
# - name: Test
# run: v test-all
- name: Build option_test.c.v with -autofree
run: v -autofree vlib/v/tests/option_test.c.v
run: v -autofree vlib/v/tests/options/option_test.c.v
- name: Test v->js
run: v -o hi.js examples/hello_v_js.v && node hi.js
- name: Test v binaries

View File

@ -225,7 +225,7 @@ pub fn new_test_session(_vargs string, will_compile bool) TestSession {
skip_files << 'examples/coroutines/simple_coroutines.v'
skip_files << 'examples/coroutines/coroutines_bench.v'
$if msvc {
skip_files << 'vlib/v/tests/const_comptime_eval_before_vinit_test.v' // _constructor used
skip_files << 'vlib/v/tests/consts/const_comptime_eval_before_vinit_test.v' // _constructor used
skip_files << 'vlib/v/tests/project_with_cpp_code/compiling_cpp_files_with_a_cplusplus_compiler_test.c.v'
}
$if solaris {

View File

@ -186,7 +186,7 @@ const skip_with_fsanitize_memory = [
'vlib/net/websocket/websocket_test.v',
'vlib/net/smtp/smtp_test.v',
'vlib/v/tests/websocket_logger_interface_should_compile_test.v',
'vlib/v/tests/fn_literal_type_test.v',
'vlib/v/tests/fns/fn_literal_type_test.v',
'vlib/x/sessions/tests/db_store_test.v',
]
const skip_with_fsanitize_address = [
@ -280,7 +280,7 @@ const skip_on_ubuntu_musl = [
'vlib/builtin/js/array_test.js.v',
'vlib/net/smtp/smtp_test.v',
'vlib/v/tests/websocket_logger_interface_should_compile_test.v',
'vlib/v/tests/fn_literal_type_test.v',
'vlib/v/tests/fns/fn_literal_type_test.v',
'vlib/x/sessions/tests/db_store_test.v',
'vlib/x/vweb/tests/vweb_test.v',
'vlib/x/vweb/tests/vweb_app_test.v',
@ -294,10 +294,10 @@ const skip_on_non_linux = [
]
const skip_on_windows_msvc = [
'do_not_remove',
'vlib/v/tests/const_fixed_array_containing_references_to_itself_test.v', // error C2099: initializer is not a constant
'vlib/v/tests/const_and_global_with_same_name_test.v', // error C2099: initializer is not a constant
'vlib/v/tests/sumtype_as_cast_1_test.v', // error: cannot support compound statement expression ({expr; expr; expr;})
'vlib/v/tests/sumtype_as_cast_2_test.v', // error: cannot support compound statement expression ({expr; expr; expr;})
'vlib/v/tests/consts/const_fixed_array_containing_references_to_itself_test.v', // error C2099: initializer is not a constant
'vlib/v/tests/consts/const_and_global_with_same_name_test.v', // error C2099: initializer is not a constant
'vlib/v/tests/sumtypes/sumtype_as_cast_1_test.v', // error: cannot support compound statement expression ({expr; expr; expr;})
'vlib/v/tests/sumtypes/sumtype_as_cast_2_test.v', // error: cannot support compound statement expression ({expr; expr; expr;})
'vlib/v/tests/project_with_cpp_code/compiling_cpp_files_with_a_cplusplus_compiler_test.c.v', // TODO
]
const skip_on_windows = [
@ -317,7 +317,7 @@ const skip_on_windows = [
'vlib/sync/many_times_test.v',
'vlib/sync/once_test.v',
'vlib/v/tests/websocket_logger_interface_should_compile_test.v',
'vlib/v/tests/fn_literal_type_test.v',
'vlib/v/tests/fns/fn_literal_type_test.v',
]
const skip_on_non_windows = [
'do_not_remove',
@ -337,7 +337,7 @@ const skip_on_arm64 = [
const skip_on_non_amd64_or_arm64 = [
'do_not_remove',
// closures aren't implemented yet:
'vlib/v/tests/closure_test.v',
'vlib/v/tests/fns/closure_test.v',
// native aren't implemented:
'vlib/v/gen/native/tests/native_test.v',
'vlib/context/cancel_test.v',

View File

@ -0,0 +1,48 @@
module geometry
const module_name = 'geometry'
pub enum Shape {
circle
rectangle
triangle
}
pub type ShapeMap = map[Shape]string
// used by vlib/v/tests/map_enum_keys_test.v
pub enum Form3D {
sphere
cylinder
cone
cube
invalid
}
pub struct Point {
pub mut:
x int
y int
}
pub struct Line {
pub mut:
ps []Point
}
pub fn (a Point) + (b Point) Point {
return Point{
x: a.x + b.x
y: a.y + b.y
}
}
pub fn (a Point) str() string {
return '${a.x} ${a.y}'
}
pub fn point_str(a Point) string {
return a.str()
}
pub type PointCond = fn (p Point) bool

Some files were not shown because too many files have changed in this diff Show More