Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/actions/install-wasi-sdk/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description: 'Install the wasi-sdk toolchain'
inputs:
version:
description: "Wasi-sdk version to install"
default: "30"
default: "34"

runs:
using: composite
Expand Down Expand Up @@ -34,8 +34,8 @@ runs:
- name: Setup `wasm-tools`
uses: bytecodealliance/actions/wasm-tools/setup@v1
with:
version: "1.252.0"
version: "1.258.0"
- name: Setup `wasmtime`
uses: bytecodealliance/actions/wasmtime/setup@v1
with:
version: "46.0.1"
version: "48.0.1"
4 changes: 4 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,10 @@ jobs:
with:
dotnet-version: '9.x'
if: matrix.lang == 'csharp'
- uses: ./.github/actions/install-wasi-sdk
if: matrix.lang == 'csharp'
with:
version: 29

# As of this writing async tests require [a patched build of
# Go](https://github.com/dicej/go/releases/tag/go1.25.5-wasi-on-idle).
Expand Down
19 changes: 2 additions & 17 deletions tests/runtime/lists/runner.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
#include <assert.h>
#include <cmath>
#include <limits.h>
#include <float.h>
#include <runner_cpp.h>
#include <vector>

static bool equal(wit::string const&a, std::string_view b) {
return a.get_view() == b;
Expand All @@ -22,18 +24,6 @@ static bool equal(std::span<R> const&a, std::span<S> const& b) {
return true;
}
template<class R>
static bool equal(wit::vector<R> const&a, std::span<R> const& b) {
return equal(a.get_view(), b);
}
template<class R>
static bool equal(std::span<const R> const&a, wit::vector<R> const& b) {
return equal(b, a);
}
template<class R>
static bool equal(std::span<const R> const&a, std::vector<R> const& b) {
return equal(a, std::span<R>(b));
}
template<class R>
static bool equal(wit::vector<R> const&a, std::vector<R> const& b) {
return equal(a.get_view(), std::span<R const>(b));
}
Expand All @@ -45,11 +35,6 @@ static bool equal(std::tuple<R,S> const&a, std::tuple<T,U> const& b) {
return equal(std::get<0>(a), std::get<0>(b)) && equal(std::get<1>(a), std::get<1>(b));
}

template <class T>
static bool equal(T const& a, T const& b) {
return a==b;
}

void exports::runner::Run()
{
using namespace ::test::lists::to_test;
Expand Down
17 changes: 1 addition & 16 deletions tests/runtime/lists/test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
#include <test_cpp.h>
#include <float.h>
#include <math.h>
#include <vector>

uint32_t exports::test::lists::to_test::AllocatedBytes() {
return 0;
Expand All @@ -20,25 +21,9 @@ static bool equal(std::span<R> const&a, std::span<S> const& b) {
return true;
}
template<class R>
static bool equal(wit::vector<R> const&a, std::span<R> const& b) {
return equal(a.get_view(), b);
}
template<class R>
static bool equal(std::span<const R> const&a, wit::vector<R> const& b) {
return equal(b, a);
}
template<class R>
static bool equal(std::span<const R> const&a, std::vector<R> const& b) {
return equal(a, std::span<const R>(b));
}
template<class R>
static bool equal(wit::vector<R> const&a, std::vector<R> const& b) {
return equal(a.get_view(), std::span<R const>(b));
}
template<class R,class S, class T, class U>
static bool equal(std::tuple<R,S> const&a, std::tuple<T,U> const& b) {
return equal(std::get<0>(a), std::get<0>(b)) && equal(std::get<1>(a), std::get<1>(b));
}

static bool equal(wit::string const& a, std::string_view b) {
return a.get_view() == b;
Expand Down
1 change: 1 addition & 0 deletions tests/runtime/numbers/runner.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#include <assert.h>
#include <cmath>
#include <limits.h>
#include <runner_cpp.h>

Expand Down
1 change: 1 addition & 0 deletions tests/runtime/resource_borrow_in_record/runner.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#include <runner_cpp.h>
#include <array>

namespace test_imports = ::test::resource_borrow_in_record::to_test;
#include <iostream>
Expand Down
10 changes: 0 additions & 10 deletions tests/runtime/results/runner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,6 @@ static bool equal(std::expected<T, U> const& a, std::expected<T, U> const& b) {
return equal(a.error(), b.error());
}
}
template <class U>
static bool equal(std::expected<void, U> const& a, std::expected<void, U> const& b) {
if (a.has_value()) {
if (!b.has_value()) return false;
return true;
} else {
if (b.has_value()) return false;
return equal(a.error(), b.error());
}
}
static bool equal(std::expected<void, wit::string> const& a, std::expected<void, std::string_view> const& b) {
if (a.has_value()) {
if (!b.has_value()) return false;
Expand Down
10 changes: 0 additions & 10 deletions tests/runtime/variants/runner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -110,16 +110,6 @@ static bool equal(std::expected<void, U> const& a, std::expected<void, U> const&
}
}
template <class T>
static bool equal(std::expected<T, wit::string> const& a, std::expected<T, std::string_view> const& b) {
if (a.has_value()) {
if (!b.has_value()) return false;
return equal(*a, *b);
} else {
if (b.has_value()) return false;
return equal(a.error().get_view(), b.error());
}
}
template <class T>
static bool equal(std::optional<T> const& a, std::optional<T> const& b) {
if (a.has_value() != b.has_value()) return false;
if (a.has_value()) {
Expand Down
Loading