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

tests: remove module main from tests, that do not need to be internal

This commit is contained in:
Delyan Angelov 2022-12-26 15:31:23 +02:00
parent 728b4cffc3
commit 94a36c5ca4
No known key found for this signature in database
GPG Key ID: 66886C0F12D595ED
58 changed files with 0 additions and 116 deletions

View File

@ -1,5 +1,3 @@
module main
type ALchar = char
fn test_alias_char_type_reference() {

View File

@ -1,5 +1,3 @@
module main
fn test_anon_fn_with_nested_anon_fn_args() {
mut xa := fn (x fn (int) string, y int) string {
return x(y)

View File

@ -1,5 +1,3 @@
module main
fn func(arg struct { foo string }) {
assert arg.foo == 'foo'
}

View File

@ -1,5 +1,3 @@
module main
fn test_cast_bool_to_int() {
i := true
x := int(i)

View File

@ -1,5 +1,3 @@
module main
type CEnum = int
enum Enum {

View File

@ -1,5 +1,3 @@
module main
fn test_cast_to_anon_sumtype() {
x := string|none(none)
println(x)

View File

@ -1,5 +1,3 @@
module main
fn test_cast_to_alias() {
r1 := u8(u8(1))
println(r1)

View File

@ -1,5 +1,3 @@
module main
import datatypes
struct Item {

View File

@ -1,5 +1,3 @@
module main
// exploring `decode` options with nested structs
struct Parent {

View File

@ -1,5 +1,3 @@
module main
struct S1 {}
fn test_comptime_for_method_call_str() {

View File

@ -1,5 +1,3 @@
module main
fn write[T](out T) string {
$if T.typ is bool {
println('FOO')

View File

@ -1,5 +1,3 @@
module main
import term
fn abc() {

View File

@ -1,5 +1,3 @@
module main
import os
const iterations = (os.getenv_opt('ITERATIONS') or { '5' }).int()

View File

@ -1,5 +1,3 @@
module main
import rand
import rand.wyrand
import rand.splitmix64

View File

@ -1,5 +1,3 @@
module main
fn test_fixed_array_of_threads() {
mut avar := [8]thread string{}
avar[0] = spawn printme()

View File

@ -1,5 +1,3 @@
module main
import time
struct Game {

View File

@ -1,5 +1,3 @@
module main
type VkPresentModeKHR = u32
fn create_c_array[T](len u32) &T {

View File

@ -1,5 +1,3 @@
module main
fn get_value[T]() ?T {
return none
}

View File

@ -1,5 +1,3 @@
module main
struct Empty {}
struct Node[T] {

View File

@ -1,5 +1,3 @@
module main
struct None {}
pub type Maybe[T] = None | T

View File

@ -1,5 +1,3 @@
module main
interface TypeFactory[T] {
get_type(type_name string) T
}

View File

@ -1,5 +1,3 @@
module main
struct Container[T] {
value T
}

View File

@ -1,5 +1,3 @@
module main
fn test_generics_method_with_sumtype_args() {
mut me := CatDad{}
ret := me.adopt[CatType, Cat](CatType.black, BlackCat{})

View File

@ -1,5 +1,3 @@
module main
struct None {}
type OptError = None | string

View File

@ -1,5 +1,3 @@
module main
pub struct Person {
pub mut:
id int

View File

@ -1,5 +1,3 @@
module main
pub struct Maybe[T] {
present bool
val T

View File

@ -1,5 +1,3 @@
module main
pub struct Randomizer[T] {
}

View File

@ -1,5 +1,3 @@
module main
pub struct Reptile {}
pub struct Insect {}

View File

@ -1,5 +1,3 @@
module main
pub struct Vec[T] {
mut:
data &T

View File

@ -1,5 +1,3 @@
module main
fn foo[T](val T) ?T {
return val
}

View File

@ -1,5 +1,3 @@
module main
fn test_go_call_fn_using_map_value() {
sum := fn (x int, y int) int {
return x + y

View File

@ -1,5 +1,3 @@
module main
import rand
interface Sample {

View File

@ -1,5 +1,3 @@
module main
type ConfigValue = bool | int | string
type ConfigMap = map[string]ConfigValue

View File

@ -1,5 +1,3 @@
module main
import geometry { Line, Point, PointCond, Shape, point_str }
fn point_is(p Point, cond PointCond) bool {

View File

@ -1,5 +1,3 @@
module main
fn test_interface_embedding_call() {
g1 := G1{}
do_the_greet(g1)

View File

@ -1,5 +1,3 @@
module main
pub interface IObject {
mut:
do_stuff()

View File

@ -1,5 +1,3 @@
module main
interface Getter {
get() string
}

View File

@ -1,5 +1,3 @@
module main
interface Speaker {
say() string
}

View File

@ -1,5 +1,3 @@
module main
fn test_mark_as_referenced() {
if true {
a := Type{}

View File

@ -1,5 +1,3 @@
module main
type Sum = Struct | int
struct Struct {

View File

@ -1,5 +1,3 @@
module main
fn has_optional() ?int {
return 51
}

View File

@ -1,5 +1,3 @@
module main
type Abc = int | rune | string | u32
fn cyz() (Abc, string) {

View File

@ -1,5 +1,3 @@
module main
import time
struct Alarms {

View File

@ -1,5 +1,3 @@
module main
fn test_shared_array_last() {
shared a := []int{}
lock {

View File

@ -1,5 +1,3 @@
module main
import time
struct Alarms {

View File

@ -1,5 +1,3 @@
module main
struct ABC {
mut:
s string

View File

@ -1,5 +1,3 @@
module main
struct Aa {
mut:
b []int

View File

@ -1,5 +1,3 @@
module main
[heap]
pub struct Grid {
pub mut:

View File

@ -1,5 +1,3 @@
module main
struct Anything {
mut:
name string

View File

@ -1,5 +1,3 @@
module main
struct Person {
name string
age int

View File

@ -1,5 +1,3 @@
module main
struct Animal {
Duck
id int

View File

@ -1,5 +1,3 @@
module main
struct Author {
username string
name string

View File

@ -1,5 +1,3 @@
module main
interface Greeting {
tt ?string
}

View File

@ -1,5 +1,3 @@
module main
fn string_none() string|none {
return none
}

View File

@ -1,5 +1,3 @@
module main
struct PlotData {
dates []string
numerical_result []int

View File

@ -1,5 +1,3 @@
module main
pub struct SomeThing {
pub:
m map[string]string

View File

@ -1,5 +1,3 @@
module main
fn test_typeof_fn() {
assert typeof[fn (s string, x u32) (int, f32)]().name == 'fn (string, u32) (int, f32)'
}

View File

@ -1,5 +1,3 @@
module main
fn test_autoprint_string_vargs() {
add_s('a')
assert true