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

tests: make projects_with_c_code closer to actual projects (#19008)

This commit is contained in:
Turiiya 2023-07-30 05:00:48 +02:00 committed by GitHub
parent b622dca915
commit 77049600e6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
12 changed files with 20 additions and 33 deletions

View File

@ -1,4 +0,0 @@
Do not delete this file.
It is used by V to stop the lookup for v.mod,
so that the top level vlib/v.mod is not found,
if you delete mod1/v.mod .

View File

@ -1,5 +0,0 @@
Module {
name: 'mod1',
description: 'A simple module, containing C code.',
dependencies: []
}

View File

@ -1,7 +1,7 @@
module mod1 module mod1
#flag -I @VMODROOT/c #flag -I @VMODROOT/mod1/c
#flag @VMODROOT/c/implementation.o #flag @VMODROOT/mod1/c/implementation.o
#include "header.h" #include "header.h"

View File

@ -0,0 +1,5 @@
Module {
name: 'project_with_c_code',
description: 'A simple project, containing C code.',
dependencies: []
}

View File

@ -1,5 +0,0 @@
Do not delete this file.
It is used by V to stop the lookup for v.mod,
so that the top level vlib/v.mod is not found,
if you delete modc/v.mod .

View File

@ -1,5 +0,0 @@
Module {
name: 'modc',
description: 'Another module, wrapping some C code.',
dependencies: []
}

View File

@ -1,7 +1,7 @@
module modc module modc
#flag -I @VMODROOT #flag -I @VMODROOT/modc
#flag @VMODROOT/impl.o #flag @VMODROOT/modc/impl.o
#include "header.h" #include "header.h"
struct C.Atype { struct C.Atype {
@ -14,7 +14,7 @@ struct C.Atype {
// Relatedly, if you want to mark a V function as unsafe, use [unsafe]. // Relatedly, if you want to mark a V function as unsafe, use [unsafe].
// //
// The V compiler forces all calls of unsafe functions to be wrapped in `unsafe{...}` blocks. // The V compiler forces all calls of unsafe functions to be wrapped in `unsafe{...}` blocks.
struct Vtype { pub struct Vtype {
pub mut: pub mut:
p &C.Atype p &C.Atype
} }

View File

@ -0,0 +1,5 @@
Module {
name: 'project_with_c_code_2',
description: 'A simple project, containing C code.',
dependencies: []
}

View File

@ -1,4 +0,0 @@
Do not delete this file.
It is used by V to stop the lookup for v.mod,
so that the top level vlib/v.mod is not found,
if you delete mod1/v.mod .

View File

@ -1,5 +0,0 @@
Module {
name: 'mod1',
description: 'A simple module, containing C code.',
dependencies: []
}

View File

@ -0,0 +1,5 @@
Module {
name: 'project_with_c_code_3',
description: 'A simple project, containing C code.',
dependencies: []
}