File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+
2+ #include < cassert>
3+ extern " C" bool raw_is_path_exists (const char *path);
4+
5+ int main () {
6+ const char *valid_path = " ../tests-ffi" ;
7+ const char *wrong_path = " ../abcxyzw1133" ;
8+
9+ assert (raw_is_path_exists (valid_path));
10+ assert (!raw_is_path_exists (wrong_path));
11+
12+ return 0 ;
13+ }
Original file line number Diff line number Diff line change @@ -43,14 +43,20 @@ function run_ffi_test() {
4343 fi
4444
4545 for file in * .cxx; do
46+ build_output=$( basename " $file " " .cxx" )
4647 file_name=$( basename " $file " )
4748
48- $clang_cxx " $file " " $static_lib_path " -o " $build_dir /$file_name "
49+ $clang_cxx " $file " " $static_lib_path " -o " $build_dir /$build_output "
4950 echo
50- echo -e " \e[0;32m[+] Test for $file_name :\e[0;37m"
51- ./" $build_dir /$file_name "
51+ echo -e -n " \e[0;32m[+] Test for $file_name :\e[0;37m"
5252
53- echo -e " \e[0;32m[+] Test for $file_name success with status code: $? \e[0;37m"
53+ time_test=$( {
54+ time ./" $build_dir /$build_output "
55+ } )
56+
57+ status_code=$?
58+ echo -e -n " $time_test "
59+ echo -e " \e[0;32m[+] Test for $file_name success with status code: $status_code \e[0;37m"
5460
5561 for _ in {1..25}; do
5662 printf " _"
You can’t perform that action at this time.
0 commit comments