File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -251,6 +251,7 @@ module RubyWasm
251251 def ar : -> String
252252
253253 def install : (_CommandExecutor executor) -> void
254+ def wasi_sysroot? : -> bool
254255 end
255256
256257 class WASISDK < Toolchain
@@ -268,6 +269,7 @@ module RubyWasm
268269 def download_url : () -> String
269270 def install_wasi_sdk : (_CommandExecutor executor) -> void
270271 def install : (_CommandExecutor executor) -> void
272+ def wasi_sysroot? : -> bool
271273 end
272274
273275 class Binaryen
Original file line number Diff line number Diff line change 1+ require "test-unit"
2+ require_relative "../lib/ruby_wasm/build/toolchain"
3+ # require "bundler"
4+
5+ class ToolchainPredicateTest < Test ::Unit ::TestCase
6+ def test_base_toolchain_is_not_wasi_sysroot
7+ assert_equal false , Class . new ( RubyWasm ::Toolchain ) . allocate . wasi_sysroot?
8+ end
9+
10+ def test_wasi_sdk_is_wasi_sysroot
11+ assert_equal true , Class . new ( RubyWasm ::WASISDK ) . allocate . wasi_sysroot?
12+ end
13+
14+ def test_emscripten_is_not_wasi_sysroot
15+ assert_equal false , Class . new ( RubyWasm ::Emscripten ) . allocate . wasi_sysroot?
16+ end
17+ end
You can’t perform that action at this time.
0 commit comments