Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .github/workflows/linux_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/windows_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion cmd/tools/modules/testing/common.v
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
16 changes: 8 additions & 8 deletions cmd/tools/vtest-self.v
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [
Expand Down Expand Up @@ -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',
Expand All @@ -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 = [
Expand All @@ -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',
Expand All @@ -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',
Expand Down
48 changes: 48 additions & 0 deletions vlib/v/tests/aliases/modules/geometry/geometry.v
Original file line number Diff line number Diff line change
@@ -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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
48 changes: 48 additions & 0 deletions vlib/v/tests/builtin_maps/modules/geometry/geometry.v
Original file line number Diff line number Diff line change
@@ -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
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading