mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
cgen_test: skip empty lines; os: make vc_gen compile
This commit is contained in:
@@ -35,8 +35,10 @@ fn test_c_files() {
|
||||
}
|
||||
|
||||
fn compare_texts(a, b string) bool {
|
||||
lines_a := a.trim_space().split_into_lines()
|
||||
lines_b := b.trim_space().split_into_lines()
|
||||
lines_a_ := a.trim_space().split_into_lines()
|
||||
lines_b_ := b.trim_space().split_into_lines()
|
||||
lines_a := lines_a_.filter(it != '')
|
||||
lines_b := lines_b_.filter(it != '')
|
||||
if lines_a.len != lines_b.len {
|
||||
println(term.red('different len'))
|
||||
// return false
|
||||
@@ -44,7 +46,8 @@ fn compare_texts(a, b string) bool {
|
||||
for i, line_a in lines_a {
|
||||
line_b := lines_b[i]
|
||||
if line_a.trim_space() != line_b.trim_space() {
|
||||
println(term.red('!' + line_a))
|
||||
println(term.red('i=$i a="$line_a" b="$line_b"'))
|
||||
// exit(1)
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
@@ -54,6 +54,11 @@ void init_array() {
|
||||
});
|
||||
}
|
||||
|
||||
void end() {
|
||||
|
||||
}
|
||||
|
||||
|
||||
int main() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -53,7 +53,6 @@ fn function2() {
|
||||
j := 0
|
||||
}
|
||||
|
||||
|
||||
fn init_array() {
|
||||
nums := [1,2,3]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user