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:
parent
b622dca915
commit
77049600e6
@ -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 .
|
|
@ -1,5 +0,0 @@
|
|||||||
Module {
|
|
||||||
name: 'mod1',
|
|
||||||
description: 'A simple module, containing C code.',
|
|
||||||
dependencies: []
|
|
||||||
}
|
|
@ -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"
|
||||||
|
|
||||||
|
5
vlib/v/tests/project_with_c_code/v.mod
Normal file
5
vlib/v/tests/project_with_c_code/v.mod
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
Module {
|
||||||
|
name: 'project_with_c_code',
|
||||||
|
description: 'A simple project, containing C code.',
|
||||||
|
dependencies: []
|
||||||
|
}
|
@ -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 .
|
|
@ -1,5 +0,0 @@
|
|||||||
Module {
|
|
||||||
name: 'modc',
|
|
||||||
description: 'Another module, wrapping some C code.',
|
|
||||||
dependencies: []
|
|
||||||
}
|
|
@ -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
|
||||||
}
|
}
|
||||||
|
5
vlib/v/tests/project_with_c_code_2/v.mod
Normal file
5
vlib/v/tests/project_with_c_code_2/v.mod
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
Module {
|
||||||
|
name: 'project_with_c_code_2',
|
||||||
|
description: 'A simple project, containing C code.',
|
||||||
|
dependencies: []
|
||||||
|
}
|
@ -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 .
|
|
@ -1,5 +0,0 @@
|
|||||||
Module {
|
|
||||||
name: 'mod1',
|
|
||||||
description: 'A simple module, containing C code.',
|
|
||||||
dependencies: []
|
|
||||||
}
|
|
5
vlib/v/tests/project_with_c_code_3/v.mod
Normal file
5
vlib/v/tests/project_with_c_code_3/v.mod
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
Module {
|
||||||
|
name: 'project_with_c_code_3',
|
||||||
|
description: 'A simple project, containing C code.',
|
||||||
|
dependencies: []
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user