| 1 | name: CI macOS |
| 2 | |
| 3 | on: |
| 4 | push: |
| 5 | branches: |
| 6 | - master |
| 7 | paths-ignore: |
| 8 | - '**.md' |
| 9 | - '**.yml' |
| 10 | - '!**/macos_ci.yml' |
| 11 | - 'cmd/tools/**' |
| 12 | - '!cmd/tools/builders/**.v' |
| 13 | pull_request: |
| 14 | paths-ignore: |
| 15 | - '**.md' |
| 16 | - '**.yml' |
| 17 | - '!**/macos_ci.yml' |
| 18 | - 'cmd/tools/**' |
| 19 | - '!cmd/tools/builders/**.v' |
| 20 | |
| 21 | concurrency: |
| 22 | group: macos-${{ github.workflow }}-${{ github.ref == 'refs/heads/master' && github.sha || github.ref }} |
| 23 | cancel-in-progress: true |
| 24 | |
| 25 | jobs: |
| 26 | clang-macos: |
| 27 | strategy: |
| 28 | matrix: |
| 29 | os: [macos-14] |
| 30 | fail-fast: false |
| 31 | runs-on: ${{ matrix.os }} |
| 32 | timeout-minutes: 151 |
| 33 | env: |
| 34 | VFLAGS: -cc clang |
| 35 | VTEST_SHOW_LONGEST_BY_RUNTIME: 3 |
| 36 | VTEST_SHOW_LONGEST_BY_COMPTIME: 3 |
| 37 | VTEST_SHOW_LONGEST_BY_TOTALTIME: 3 |
| 38 | steps: |
| 39 | - uses: actions/checkout@v6 |
| 40 | - name: Cache Homebrew downloads |
| 41 | uses: actions/cache@v5 |
| 42 | with: |
| 43 | path: ~/Library/Caches/Homebrew |
| 44 | key: brew-${{ matrix.os }}-${{ hashFiles('.github/workflows/macos_ci.yml', 'ci/macos_ci.vsh') }} |
| 45 | restore-keys: | |
| 46 | brew-${{ matrix.os }}- |
| 47 | - name: Build V |
| 48 | run: make -j4 && ./v symlink |
| 49 | - name: Test symlink |
| 50 | run: v run ci/macos_ci.vsh test_symlink |
| 51 | - name: v doctor |
| 52 | run: v run ci/macos_ci.vsh v_doctor |
| 53 | - name: Build v with -prealloc |
| 54 | run: v run ci/macos_ci.vsh build_v_with_prealloc |
| 55 | - name: Test cross compilation to Linux |
| 56 | run: v run ci/macos_ci.vsh test_cross_compilation |
| 57 | - name: Test inline assembly on macos |
| 58 | run: v run ci/macos_ci.vsh test_inline_assembly |
| 59 | - name: Build V with -cstrict |
| 60 | run: v run ci/macos_ci.vsh build_with_cstrict |
| 61 | - name: All code is formatted |
| 62 | run: v run ci/macos_ci.vsh all_code_is_formatted |
| 63 | - name: Run sanitizers |
| 64 | run: v run ci/macos_ci.vsh run_sanitizers |
| 65 | - name: Build V using V |
| 66 | run: v run ci/macos_ci.vsh build_using_v |
| 67 | - name: Verify `v test` works |
| 68 | run: v run ci/macos_ci.vsh verify_v_test_works |
| 69 | - name: Install iconv for encoding.iconv |
| 70 | run: v run ci/macos_ci.vsh install_iconv |
| 71 | - name: Test pure V math module |
| 72 | run: v run ci/macos_ci.vsh test_pure_v_math_module |
| 73 | - name: Self tests |
| 74 | run: v run ci/macos_ci.vsh self_tests |
| 75 | - name: Build examples |
| 76 | run: v run ci/macos_ci.vsh build_examples |
| 77 | - name: Build tetris with -autofree |
| 78 | run: v run ci/macos_ci.vsh build_tetris_autofree |
| 79 | - name: Build blog tutorial with -autofree |
| 80 | run: v run ci/macos_ci.vsh build_blog_autofree |
| 81 | - name: Build examples with -prod |
| 82 | run: v run ci/macos_ci.vsh build_examples_prod |
| 83 | - name: Build examples with V build with tcc |
| 84 | run: v run ci/macos_ci.vsh build_examples_v_compiled_with_tcc |
| 85 | ## - name: V self compilation with -usecache |
| 86 | ## run: v run ci/macos_ci.vsh v_self_compilation_usecache |
| 87 | - name: V self compilation with -parallel-cc |
| 88 | run: v run ci/macos_ci.vsh v_self_compilation_parallel_cc |
| 89 | - name: v2 test suite |
| 90 | if: ${{ false }} # Temporarily disabled. |
| 91 | run: v run cmd/v2/test_all.vsh -prod |
| 92 | - name: Test password input |
| 93 | run: v run ci/macos_ci.vsh test_password_input |
| 94 | - name: Test readline |
| 95 | run: v run ci/macos_ci.vsh test_readline |
| 96 | |
| 97 | v2-x64-native-macos: |
| 98 | runs-on: macos-15-intel |
| 99 | timeout-minutes: 30 |
| 100 | steps: |
| 101 | - uses: actions/checkout@v6 |
| 102 | - name: Build V |
| 103 | run: make -j4 |
| 104 | - name: backend x64 regressions |
| 105 | run: | |
| 106 | set -e |
| 107 | |
| 108 | VJOBS=1 ./v test \ |
| 109 | vlib/v2/abi \ |
| 110 | vlib/v2/gen/x64/x64_abi_test.v \ |
| 111 | vlib/v2/gen/x64/x64_backend_diagnostics_test.v \ |
| 112 | vlib/v2/gen/x64/x64_object_format_test.v \ |
| 113 | vlib/v2/gen/x64/x64_pe_linker_test.v \ |
| 114 | vlib/v2/ssa/tree_sumtype_lowering_test.v |
| 115 | VJOBS=1 ./v test -run-only test_module_qualified_alias_array_field_index_has_alias_element_type,test_module_storage_legacy_direct_import_nested_module_selector_uses_declared_leaf_module,test_module_storage_flat_direct_import_nested_module_selector_uses_declared_leaf_module vlib/v2/ssa/module_storage_test.v |
| 116 | VJOBS=1 ./v test -run-only test_temporary_generic_receiver_init_maps_method_generic,test_temporary_generic_call_receiver_maps_method_generic,test_temporary_generic_selector_receiver_maps_method_generic,test_identifier_generic_receiver_from_call_maps_method_generic vlib/v2/types/checker_test.v |
| 117 | VJOBS=1 ./v test -run-only test_worker_clone_sees_sumtype_decl_variant_cache,test_sumtype_decl_variant_cache_records_concrete_generic_variants_only,test_generic_sumtype_match_uses_full_specialization_when_generic_base_repeats,test_flat_direct_generic_sumtype_match_uses_full_specialization_when_generic_base_repeats,test_generic_sumtype_match_smartcast_scans_full_specialization_body,test_flat_direct_generic_sumtype_match_smartcast_scans_full_specialization_body,test_nested_module_concrete_generic_sumtype_base_does_not_fall_back_to_local_tree,test_leaf_module_concrete_generic_sumtype_base_fallback_beats_parent_module_tree vlib/v2/transformer/monomorphize_test.v |
| 118 | VJOBS=1 ./v test -run-only test_x64_macos_windows_math_log_20_stdout_exact_bytes,test_x64_macos_windows_generic_sumtype_repeated_base_specialization_stdout_exact_bytes,test_x64_macos_windows_formatted_int_interpolation_stdout_exact_bytes,test_x64_macos_windows_formatted_int_width_100_interpolation_stdout_exact_bytes,test_x64_macos_windows_formatted_f64_interpolation_stdout_exact_bytes,test_x64_macos_windows_formatted_string_return_lifetime_stdout_exact_bytes,test_x64_macos_windows_spectral_reduced_formatted_stdout_exact_bytes,test_x64_macos_windows_bits_len32_stdout_exact_bytes,test_x64_macos_windows_rand_u32n_interface_result_stdout_exact_bytes,test_x64_macos_windows_rand_intn_range_interface_result_stdout_exact_bytes,test_x64_macos_windows_textscanner_embedded_parser_stdout_exact_bytes,test_x64_macos_windows_struct_positional_side_effect_stdout_exact_bytes,test_x64_macos_windows_struct_named_side_effect_stdout_exact_bytes,test_x64_macos_windows_unrelated_same_shape_struct_stdout_exact_bytes,test_x64_macos_windows_named_init_embedded_value_stdout_exact_bytes,test_x64_macos_windows_get_raw_line_example_stdin_stdout_exact_bytes,test_x64_macos_windows_mini_calculator_example_stdin_stdout_exact_bytes,test_x64_macos_windows_mini_calculator_recursive_descent_example_stdin_stdout_exact_bytes,test_x64_macos_external_c_flag_source_uses_hosted_link_with_compile_flags vlib/v2/gen/x64/x64_runtime_smoke_test.v |
| 119 | ./v test vlib/v2/builder/native_test.v vlib/v2/builder/target_os_test.v |
| 120 | ./v test vlib/v2/ssa/optimize |
| 121 | V2_VERIFY_STRICT=1 ./v test vlib/v2/ssa/optimize |
| 122 | |
| 123 | - name: backend x64 examples |
| 124 | run: | |
| 125 | set -e |
| 126 | |
| 127 | tmp="$(mktemp -d)" |
| 128 | trap 'rm -rf "$tmp"' EXIT |
| 129 | |
| 130 | check_empty_stderr() { |
| 131 | label="$1" |
| 132 | stderr="$2" |
| 133 | if [ -s "$stderr" ]; then |
| 134 | echo "::error::$label wrote to stderr" |
| 135 | cat "$stderr" |
| 136 | return 1 |
| 137 | fi |
| 138 | } |
| 139 | |
| 140 | check_v_run_stderr() { |
| 141 | label="$1" |
| 142 | stderr="$2" |
| 143 | if [ ! -s "$stderr" ]; then |
| 144 | return 0 |
| 145 | fi |
| 146 | if python3 - "$stderr" <<'PY' |
| 147 | import re |
| 148 | import sys |
| 149 | |
| 150 | text = open(sys.argv[1], "rb").read().decode("utf-8", "replace") |
| 151 | text = re.sub(r"\x1b\[[0-?]*[ -/]*[@-~]", "", text).strip() |
| 152 | expected = "warning: tcc compilation failed, falling back to cc (this is much slower)" |
| 153 | raise SystemExit(0 if text == expected else 1) |
| 154 | PY |
| 155 | then |
| 156 | return 0 |
| 157 | fi |
| 158 | echo "::error::$label wrote unexpected stderr" |
| 159 | cat "$stderr" |
| 160 | return 1 |
| 161 | } |
| 162 | |
| 163 | check_stdout() { |
| 164 | label="$1" |
| 165 | expected="$2" |
| 166 | actual="$3" |
| 167 | if ! cmp -s "$expected" "$actual"; then |
| 168 | echo "::error::$label stdout mismatch" |
| 169 | echo "expected:" |
| 170 | cat "$expected" |
| 171 | echo "actual:" |
| 172 | cat "$actual" |
| 173 | return 1 |
| 174 | fi |
| 175 | } |
| 176 | |
| 177 | run_native_x64_example() { |
| 178 | source="$1" |
| 179 | name="$2" |
| 180 | expected="$3" |
| 181 | shift 3 |
| 182 | |
| 183 | ./v -v2 -no-parallel -b x64 "$source" -o "$tmp/$name" |
| 184 | "$tmp/$name" "$@" > "$tmp/$name.out" 2> "$tmp/$name.err" |
| 185 | check_empty_stderr "$name" "$tmp/$name.err" |
| 186 | check_stdout "$name" "$expected" "$tmp/$name.out" |
| 187 | } |
| 188 | |
| 189 | run_native_x64_example_with_stdin() { |
| 190 | source="$1" |
| 191 | name="$2" |
| 192 | input="$3" |
| 193 | expected="$4" |
| 194 | shift 4 |
| 195 | |
| 196 | ./v -v2 -no-parallel -b x64 "$source" -o "$tmp/$name" |
| 197 | "$tmp/$name" "$@" < "$input" > "$tmp/$name.out" 2> "$tmp/$name.err" |
| 198 | check_empty_stderr "$name" "$tmp/$name.err" |
| 199 | check_stdout "$name" "$expected" "$tmp/$name.out" |
| 200 | } |
| 201 | |
| 202 | run_native_x64_example_capture() { |
| 203 | source="$1" |
| 204 | name="$2" |
| 205 | shift 2 |
| 206 | |
| 207 | ./v -v2 -no-parallel -b x64 "$source" -o "$tmp/$name" |
| 208 | "$tmp/$name" "$@" > "$tmp/$name.out" 2> "$tmp/$name.err" |
| 209 | check_empty_stderr "$name" "$tmp/$name.err" |
| 210 | } |
| 211 | |
| 212 | check_random_ips_stdout() { |
| 213 | label="$1" |
| 214 | actual="$2" |
| 215 | python3 - "$label" "$actual" <<'PY' |
| 216 | import sys |
| 217 | |
| 218 | label = sys.argv[1] |
| 219 | path = sys.argv[2] |
| 220 | lines = open(path, "r", encoding="utf-8").read().splitlines() |
| 221 | if len(lines) != 10: |
| 222 | raise SystemExit(f"{label}: expected 10 lines, got {len(lines)}") |
| 223 | rows = [] |
| 224 | for line in lines: |
| 225 | parts = line.split(".") |
| 226 | if len(parts) != 4: |
| 227 | raise SystemExit(f"{label}: invalid IPv4 shape: {line!r}") |
| 228 | row = [] |
| 229 | for part in parts: |
| 230 | if not part.isdigit(): |
| 231 | raise SystemExit(f"{label}: non-numeric octet in {line!r}") |
| 232 | value = int(part) |
| 233 | if value < 0 or value > 254: |
| 234 | raise SystemExit(f"{label}: octet out of range in {line!r}") |
| 235 | row.append(value) |
| 236 | rows.append(tuple(row)) |
| 237 | if len(set(rows)) < 3: |
| 238 | raise SystemExit(f"{label}: output has too little row diversity") |
| 239 | if all(row[1] == 0 for row in rows) and all(row[3] == 0 for row in rows): |
| 240 | raise SystemExit(f"{label}: suspicious old x.0.x.0 pattern") |
| 241 | PY |
| 242 | } |
| 243 | |
| 244 | check_rule110_stdout() { |
| 245 | label="$1" |
| 246 | actual="$2" |
| 247 | width="$3" |
| 248 | python3 - "$label" "$actual" "$width" <<'PY' |
| 249 | import sys |
| 250 | |
| 251 | label = sys.argv[1] |
| 252 | path = sys.argv[2] |
| 253 | width = int(sys.argv[3]) |
| 254 | lines = open(path, "r", encoding="utf-8").read().splitlines() |
| 255 | title = "Rule 110 V Implementation" |
| 256 | title_lines = [idx for idx, line in enumerate(lines) if title in line] |
| 257 | if not title_lines: |
| 258 | raise SystemExit(f"{label}: missing title") |
| 259 | idx = title_lines[0] |
| 260 | generations = lines[idx + 1:] |
| 261 | if generations and generations[0] == "": |
| 262 | generations = generations[1:] |
| 263 | if len(generations) != width: |
| 264 | raise SystemExit(f"{label}: expected {width} generation lines, got {len(generations)}") |
| 265 | for line in generations: |
| 266 | if len(line) != width: |
| 267 | raise SystemExit(f"{label}: generation line has width {len(line)}, expected {width}: {line!r}") |
| 268 | if any(ch not in " *" for ch in line): |
| 269 | raise SystemExit(f"{label}: invalid generation chars: {line!r}") |
| 270 | if not any("*" in line for line in generations): |
| 271 | raise SystemExit(f"{label}: expected at least one live cell") |
| 272 | if len(set(generations)) < 3: |
| 273 | raise SystemExit(f"{label}: expected at least 3 distinct generation lines") |
| 274 | PY |
| 275 | } |
| 276 | |
| 277 | write_v_run_expected() { |
| 278 | source="$1" |
| 279 | expected="$2" |
| 280 | shift 2 |
| 281 | stderr="$tmp/$(basename "$expected").stderr" |
| 282 | ./v run "$source" "$@" > "$expected" 2> "$stderr" |
| 283 | check_v_run_stderr "v run $source $*" "$stderr" |
| 284 | } |
| 285 | |
| 286 | write_v_run_expected_with_stdin() { |
| 287 | source="$1" |
| 288 | input="$2" |
| 289 | expected="$3" |
| 290 | shift 3 |
| 291 | stderr="$tmp/$(basename "$expected").stderr" |
| 292 | ./v run "$source" "$@" < "$input" > "$expected" 2> "$stderr" |
| 293 | check_v_run_stderr "v run $source $*" "$stderr" |
| 294 | } |
| 295 | |
| 296 | write_fizz_buzz_expected() { |
| 297 | i=1 |
| 298 | while [ "$i" -le 100 ]; do |
| 299 | if [ $((i % 15)) -eq 0 ]; then |
| 300 | echo FizzBuzz |
| 301 | elif [ $((i % 3)) -eq 0 ]; then |
| 302 | echo Fizz |
| 303 | elif [ $((i % 5)) -eq 0 ]; then |
| 304 | echo Buzz |
| 305 | else |
| 306 | echo "$i" |
| 307 | fi |
| 308 | i=$((i + 1)) |
| 309 | done |
| 310 | } |
| 311 | |
| 312 | write_hanoi_expected() { |
| 313 | python3 - <<'PY' |
| 314 | def hanoi(n, a, b, c): |
| 315 | if n == 1: |
| 316 | print(f"Disc 1 from {a} to {c}...") |
| 317 | else: |
| 318 | hanoi(n - 1, a, c, b) |
| 319 | print(f"Disc {n} from {a} to {c}...") |
| 320 | hanoi(n - 1, b, a, c) |
| 321 | |
| 322 | hanoi(7, "A", "B", "C") |
| 323 | PY |
| 324 | } |
| 325 | |
| 326 | write_sudoku_expected() { |
| 327 | python3 - <<'PY' |
| 328 | import sys |
| 329 | |
| 330 | puzzle = [ |
| 331 | [0, 3, 0, 0, 7, 0, 0, 0, 0], |
| 332 | [0, 0, 0, 1, 3, 5, 0, 0, 0], |
| 333 | [0, 0, 1, 0, 0, 0, 0, 5, 0], |
| 334 | [1, 0, 0, 0, 6, 0, 0, 0, 3], |
| 335 | [4, 0, 0, 8, 0, 3, 0, 0, 1], |
| 336 | [7, 0, 0, 0, 2, 0, 0, 0, 6], |
| 337 | [0, 0, 0, 0, 0, 0, 2, 1, 0], |
| 338 | [0, 0, 0, 4, 1, 2, 0, 0, 5], |
| 339 | [0, 0, 0, 0, 0, 0, 0, 7, 4], |
| 340 | ] |
| 341 | solution = [ |
| 342 | [2, 3, 5, 6, 7, 8, 1, 4, 9], |
| 343 | [9, 4, 7, 1, 3, 5, 8, 6, 2], |
| 344 | [6, 8, 1, 2, 4, 9, 3, 5, 7], |
| 345 | [1, 2, 8, 7, 6, 4, 5, 9, 3], |
| 346 | [4, 5, 6, 8, 9, 3, 7, 2, 1], |
| 347 | [7, 9, 3, 5, 2, 1, 4, 8, 6], |
| 348 | [3, 6, 4, 9, 5, 7, 2, 1, 8], |
| 349 | [8, 7, 9, 4, 1, 2, 6, 3, 5], |
| 350 | [5, 1, 2, 3, 8, 6, 9, 7, 4], |
| 351 | ] |
| 352 | |
| 353 | def append_grid(lines, label, grid): |
| 354 | lines.append(label) |
| 355 | for i, row in enumerate(grid): |
| 356 | if i % 3 == 0 and i != 0: |
| 357 | lines.append("- - - - - - - - - - - -") |
| 358 | line = "" |
| 359 | for j, value in enumerate(row): |
| 360 | if j % 3 == 0 and j != 0: |
| 361 | line += " | " |
| 362 | line += f"{value} " |
| 363 | lines.append(line) |
| 364 | |
| 365 | lines = [] |
| 366 | append_grid(lines, "Sudoku Puzzle:", puzzle) |
| 367 | lines.append("Solving...") |
| 368 | append_grid(lines, "Solution:", solution) |
| 369 | out = ("\n".join(lines) + "\n").encode() |
| 370 | if len(out) != 582: |
| 371 | raise SystemExit(f"sudoku stdout oracle shape changed: {len(out)} bytes") |
| 372 | sys.stdout.buffer.write(out) |
| 373 | PY |
| 374 | } |
| 375 | |
| 376 | write_tree_of_nodes_expected() { |
| 377 | cat <<'EOF' |
| 378 | tree structure: |
| 379 | Node{ |
| 380 | value: 10 |
| 381 | left: Tree(Node{ |
| 382 | value: 30 |
| 383 | left: Tree(Empty{}) |
| 384 | right: Tree(Empty{}) |
| 385 | }) |
| 386 | right: Tree(Node{ |
| 387 | value: 20 |
| 388 | left: Tree(Empty{}) |
| 389 | right: Tree(Empty{}) |
| 390 | }) |
| 391 | } |
| 392 | tree size: 3 |
| 393 | EOF |
| 394 | } |
| 395 | |
| 396 | write_js_hello_world_expected() { |
| 397 | printf 'Hello from V.js (0)\nHello from V.js (1)\nHello from V.js (2)\n' |
| 398 | } |
| 399 | |
| 400 | write_vascii_expected() { |
| 401 | python3 - <<'PY' |
| 402 | from pathlib import Path |
| 403 | import sys |
| 404 | |
| 405 | source = Path("examples/vascii.v").read_text(encoding="utf-8") |
| 406 | start_marker = "println('" |
| 407 | end_marker = "')" |
| 408 | if source.count(start_marker) != 1: |
| 409 | raise SystemExit("vascii stdout oracle expects one single-quoted println literal") |
| 410 | start = source.index(start_marker) + len(start_marker) |
| 411 | end = source.rindex(end_marker) |
| 412 | if source[end + len(end_marker):].strip() != "}": |
| 413 | raise SystemExit("vascii stdout oracle expects the println literal to be the final main statement") |
| 414 | |
| 415 | out = bytearray() |
| 416 | literal = source[start:end] |
| 417 | i = 0 |
| 418 | while i < len(literal): |
| 419 | ch = literal[i] |
| 420 | if ch == "\\": |
| 421 | i += 1 |
| 422 | if i >= len(literal): |
| 423 | raise SystemExit("unterminated escape in vascii literal") |
| 424 | escaped = literal[i] |
| 425 | if escaped == "n": |
| 426 | out.append(10) |
| 427 | elif escaped == "t": |
| 428 | out.append(9) |
| 429 | elif escaped == "r": |
| 430 | out.append(13) |
| 431 | elif escaped == "\\": |
| 432 | out.append(92) |
| 433 | elif escaped == "'": |
| 434 | out.append(39) |
| 435 | elif escaped == '"': |
| 436 | out.append(34) |
| 437 | else: |
| 438 | out.extend(escaped.encode("utf-8")) |
| 439 | else: |
| 440 | out.extend(ch.encode("utf-8")) |
| 441 | i += 1 |
| 442 | out.append(10) |
| 443 | sys.stdout.buffer.write(out) |
| 444 | PY |
| 445 | } |
| 446 | |
| 447 | write_rune_expected() { |
| 448 | printf '\360\237\230\200\n@\n' |
| 449 | } |
| 450 | |
| 451 | printf 'Hello, World!\n' > "$tmp/hello_world.expected" |
| 452 | write_fizz_buzz_expected > "$tmp/fizz_buzz.expected" |
| 453 | write_hanoi_expected > "$tmp/hanoi.expected" |
| 454 | write_sudoku_expected > "$tmp/sudoku.expected" |
| 455 | printf 'HELLO WORLD\nHELLO WORLD\nHELLO WORLD\n' > "$tmp/function_types.expected" |
| 456 | printf '5\n3\n' > "$tmp/submodule.expected" |
| 457 | printf '1\n1\n2\n3\n5\n8\n13\n21\n34\n55\n89\n' > "$tmp/fibonacci_10.expected" |
| 458 | printf '120\n' > "$tmp/dump_factorial.expected" |
| 459 | write_v_run_expected examples/primes.v "$tmp/primes_20.expected" 20 |
| 460 | write_tree_of_nodes_expected > "$tmp/tree_of_nodes.expected" |
| 461 | write_js_hello_world_expected > "$tmp/js_hello_world.expected" |
| 462 | write_vascii_expected > "$tmp/vascii.expected" |
| 463 | write_rune_expected > "$tmp/rune.expected" |
| 464 | write_v_run_expected examples/graphs/bfs.v "$tmp/bfs.expected" |
| 465 | write_v_run_expected examples/graphs/bfs3.v "$tmp/bfs3.expected" |
| 466 | write_v_run_expected examples/graphs/dfs.v "$tmp/dfs.expected" |
| 467 | write_v_run_expected examples/graphs/dijkstra.v "$tmp/dijkstra.expected" |
| 468 | write_v_run_expected examples/graphs/topological_sorting_greedy.v "$tmp/topological_sorting_greedy.expected" |
| 469 | write_v_run_expected examples/graphs/topological_sorting_dfs.v "$tmp/topological_sorting_dfs.expected" |
| 470 | write_v_run_expected examples/graphs/dfs2.v "$tmp/dfs2.expected" |
| 471 | write_v_run_expected examples/graphs/minimal_spann_tree_prim.v "$tmp/minimal_spann_tree_prim.expected" |
| 472 | write_v_run_expected examples/graphs/bellman-ford.v "$tmp/bellman_ford.expected" |
| 473 | write_v_run_expected examples/binary_search_tree.v "$tmp/binary_search_tree.expected" |
| 474 | printf 'wrong format\nempty input\n' > "$tmp/errors.expected" |
| 475 | write_v_run_expected examples/custom_error.v "$tmp/custom_error.expected" |
| 476 | write_v_run_expected examples/spectral.v "$tmp/spectral_10.expected" 10 |
| 477 | printf 'length of random array is 1000\nbefore quick sort whether array is sorted: false\nafter quick sort whether array is sorted: true\n' > "$tmp/quick_sort.expected" |
| 478 | printf 'hello\nworld\n' > "$tmp/get_raw_line.in" |
| 479 | write_v_run_expected_with_stdin examples/get_raw_line.v "$tmp/get_raw_line.in" "$tmp/get_raw_line.expected" |
| 480 | printf '3+4*2\nexit\n' > "$tmp/mini_calculator.in" |
| 481 | write_v_run_expected_with_stdin examples/mini_calculator.v "$tmp/mini_calculator.in" "$tmp/mini_calculator.expected" |
| 482 | printf '3+4*2\nexit\n' > "$tmp/mini_calculator_recursive_descent.in" |
| 483 | write_v_run_expected_with_stdin examples/mini_calculator_recursive_descent.v "$tmp/mini_calculator_recursive_descent.in" "$tmp/mini_calculator_recursive_descent.expected" |
| 484 | |
| 485 | run_native_x64_example examples/hello_world.v hello_world "$tmp/hello_world.expected" |
| 486 | run_native_x64_example examples/fizz_buzz.v fizz_buzz "$tmp/fizz_buzz.expected" |
| 487 | run_native_x64_example examples/hanoi.v hanoi "$tmp/hanoi.expected" |
| 488 | run_native_x64_example examples/sudoku.v sudoku "$tmp/sudoku.expected" |
| 489 | run_native_x64_example examples/function_types.v function_types "$tmp/function_types.expected" |
| 490 | run_native_x64_example examples/submodule/main.v submodule "$tmp/submodule.expected" |
| 491 | run_native_x64_example examples/fibonacci.v fibonacci "$tmp/fibonacci_10.expected" 10 |
| 492 | run_native_x64_example examples/dump_factorial.v dump_factorial "$tmp/dump_factorial.expected" |
| 493 | run_native_x64_example examples/primes.v primes "$tmp/primes_20.expected" 20 |
| 494 | run_native_x64_example examples/tree_of_nodes.v tree_of_nodes "$tmp/tree_of_nodes.expected" |
| 495 | run_native_x64_example examples/js_hello_world.v js_hello_world "$tmp/js_hello_world.expected" |
| 496 | run_native_x64_example examples/vascii.v vascii "$tmp/vascii.expected" |
| 497 | run_native_x64_example examples/rune.v rune "$tmp/rune.expected" |
| 498 | run_native_x64_example examples/graphs/bfs.v bfs "$tmp/bfs.expected" |
| 499 | run_native_x64_example examples/graphs/bfs3.v bfs3 "$tmp/bfs3.expected" |
| 500 | run_native_x64_example examples/graphs/dfs.v dfs "$tmp/dfs.expected" |
| 501 | run_native_x64_example examples/graphs/dijkstra.v dijkstra "$tmp/dijkstra.expected" |
| 502 | run_native_x64_example examples/graphs/topological_sorting_greedy.v topological_sorting_greedy "$tmp/topological_sorting_greedy.expected" |
| 503 | run_native_x64_example examples/graphs/topological_sorting_dfs.v topological_sorting_dfs "$tmp/topological_sorting_dfs.expected" |
| 504 | run_native_x64_example examples/graphs/dfs2.v dfs2 "$tmp/dfs2.expected" |
| 505 | run_native_x64_example examples/graphs/minimal_spann_tree_prim.v minimal_spann_tree_prim "$tmp/minimal_spann_tree_prim.expected" |
| 506 | run_native_x64_example examples/graphs/bellman-ford.v bellman_ford "$tmp/bellman_ford.expected" |
| 507 | run_native_x64_example examples/binary_search_tree.v binary_search_tree "$tmp/binary_search_tree.expected" |
| 508 | run_native_x64_example examples/errors.v errors "$tmp/errors.expected" |
| 509 | run_native_x64_example examples/custom_error.v custom_error "$tmp/custom_error.expected" |
| 510 | run_native_x64_example examples/spectral.v spectral "$tmp/spectral_10.expected" 10 |
| 511 | run_native_x64_example examples/quick_sort.v quick_sort "$tmp/quick_sort.expected" |
| 512 | run_native_x64_example_with_stdin examples/get_raw_line.v get_raw_line "$tmp/get_raw_line.in" "$tmp/get_raw_line.expected" |
| 513 | run_native_x64_example_with_stdin examples/mini_calculator.v mini_calculator "$tmp/mini_calculator.in" "$tmp/mini_calculator.expected" |
| 514 | run_native_x64_example_with_stdin examples/mini_calculator_recursive_descent.v mini_calculator_recursive_descent "$tmp/mini_calculator_recursive_descent.in" "$tmp/mini_calculator_recursive_descent.expected" |
| 515 | run_native_x64_example_capture examples/random_ips.v random_ips |
| 516 | check_random_ips_stdout random_ips "$tmp/random_ips.out" |
| 517 | run_native_x64_example_capture examples/rule110.v rule110 31 |
| 518 | check_rule110_stdout rule110 "$tmp/rule110.out" 31 |
| 519 | |