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
#flag -I @VMODROOT/c
#flag @VMODROOT/c/implementation.o
#flag -I @VMODROOT/mod1/c
#flag @VMODROOT/mod1/c/implementation.o
#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
#flag -I @VMODROOT
#flag @VMODROOT/impl.o
#flag -I @VMODROOT/modc
#flag @VMODROOT/modc/impl.o
#include "header.h"
struct C.Atype {
@ -14,7 +14,7 @@ struct C.Atype {
// 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.
struct Vtype {
pub struct Vtype {
pub mut:
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: []
}