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

vfmt: handle comments

This commit is contained in:
Alexander Medvednikov
2019-11-11 17:18:32 +03:00
parent 51663520c8
commit ffa6bcfff5
14 changed files with 153 additions and 72 deletions

View File

@@ -65,12 +65,12 @@ struct K {
}
fn test_empty() {
mut chunks := []Chunk{}
mut chunks := []Chunk
a := Chunk{}
assert chunks.len == 0
chunks << a
assert chunks.len == 1
chunks = []Chunk{}
chunks = []Chunk
assert chunks.len == 0
chunks << a
assert chunks.len == 1
@@ -90,6 +90,11 @@ fn test_push() {
// i := 3
// a.insert(0, &i)
// ----------------------------
fn test_insert() {
// mut a := [1, 2]
// a.insert(0, 3)
// println(a)
}
// fn test_insert() {
// mut a := [1, 2]