Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
felipensp committed Jan 23, 2025
1 parent bd919d8 commit a099589
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
20 changes: 10 additions & 10 deletions vlib/v/checker/tests/option_str_call.out
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
vlib/v/checker/tests/option_str_call.vv:8:10: error: Option type cannot be called directly, you should unwrap it first
6 | footer := doc.get_tags_by_class_name('Box-footer')[0]
7 | invalid := footer.get_tag_by_class_name('invalid')
8 | println(invalid.str()) // runtime error, invalid memory access
vlib/v/checker/tests/option_str_call.vv:7:10: error: Option type cannot be called directly, you should unwrap it first
5 | footer := doc.get_tags_by_class_name('Box-footer')[0]
6 | invalid := footer.get_tag_by_class_name('invalid')
7 | println(invalid.str())
| ~~~~~~~
9 | }
vlib/v/checker/tests/option_str_call.vv:8:2: error: `println` can not print void expressions
6 | footer := doc.get_tags_by_class_name('Box-footer')[0]
7 | invalid := footer.get_tag_by_class_name('invalid')
8 | println(invalid.str()) // runtime error, invalid memory access
8 | }
vlib/v/checker/tests/option_str_call.vv:7:2: error: `println` can not print void expressions
5 | footer := doc.get_tags_by_class_name('Box-footer')[0]
6 | invalid := footer.get_tag_by_class_name('invalid')
7 | println(invalid.str())
| ~~~~~~~~~~~~~~~~~~~~~~
9 | }
8 | }
2 changes: 1 addition & 1 deletion vlib/v/checker/tests/option_str_call.vv
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ fn main() {
mut doc := html.parse('<body><div class="Box-footer"><div class="Truncate">abc</div></div></body>')
footer := doc.get_tags_by_class_name('Box-footer')[0]
invalid := footer.get_tag_by_class_name('invalid')
println(invalid.str()) // runtime error, invalid memory access
println(invalid.str())
}

0 comments on commit a099589

Please sign in to comment.