diff --git a/vlib/v/tests/profile/calling_http_get.v b/vlib/v/tests/profile/calling_http_get.v deleted file mode 100644 index 9f31375ea6..0000000000 --- a/vlib/v/tests/profile/calling_http_get.v +++ /dev/null @@ -1,10 +0,0 @@ -import net.http - -fn main() { - if resp := http.get('http://127.0.0.1:56713/unknown_page') { - println(resp.text) - } else { - println(err) - } - assert true -} diff --git a/vlib/v/tests/profile/profile_test.v b/vlib/v/tests/profile/profile_test.v index d5e998ecdf..9abfb6fedd 100644 --- a/vlib/v/tests/profile/profile_test.v +++ b/vlib/v/tests/profile/profile_test.v @@ -11,7 +11,7 @@ fn test_vexe_exists() { fn test_v_profile_works() { os.chdir(vroot) - program_source := os.join_path(vroot, 'vlib/v/tests/profile/calling_http_get.v') + program_source := os.join_path(vroot, 'vlib/v/tests/profile/profile_test_1.v') res := os.exec('"$vexe" -profile - run $program_source') or { exit(1) } // eprintln('res: $res') assert res.exit_code == 0 @@ -19,5 +19,5 @@ fn test_v_profile_works() { assert res.output.contains(' os__init_os_args') assert res.output.contains(' main__main') assert res.output.contains(' println') - assert res.output.contains(' net__http__get') + assert res.output.contains(' strconv__atoi') } diff --git a/vlib/v/tests/profile/profile_test_1.v b/vlib/v/tests/profile/profile_test_1.v new file mode 100644 index 0000000000..7ba75004dd --- /dev/null +++ b/vlib/v/tests/profile/profile_test_1.v @@ -0,0 +1,11 @@ +import os +import strconv + +fn main() { + if n := strconv.atoi(os.args[0]) { + println(n) + } else { + println(err) + } + assert true +}