Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix failing tests after the changes in bytecodealliance/wasmtime#7285 #280

Merged
merged 1 commit into from
Oct 23, 2023
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
13 changes: 10 additions & 3 deletions tests/ConfigTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ public void ItSetsSIMD()
{
var config = new Config();
config.WithSIMD(false);
config.WithRelaxedSIMD(false, false);

Action act = () =>
{
Expand All @@ -123,17 +124,23 @@ public void ItSetsSIMD()
public void ItSetsRelaxedSIMD()
{
var config = new Config();
config.WithRelaxedSIMD(true, true);
config.WithRelaxedSIMD(false, false);

using var engine = new Engine(config);
using var module = Module.FromTextFile(engine, Path.Combine("Modules", "RelaxedSIMD.wat"));
Action act = () =>
{
using var engine = new Engine(config);
using var module = Module.FromTextFile(engine, Path.Combine("Modules", "RelaxedSIMD.wat"));
};

act.Should().Throw<WasmtimeException>();
}

[Fact]
public void ItSetsBulkMemory()
{
var config = new Config();
config.WithBulkMemory(false);
config.WithWasmThreads(false);
config.WithReferenceTypes(false);

Action act = () =>
Expand Down
9 changes: 4 additions & 5 deletions tests/MultiMemoryTests.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System;
using System.Linq;
using FluentAssertions;
using Xunit;

Expand All @@ -8,9 +7,9 @@ namespace Wasmtime.Tests
public class MultiMemoryTests
{
[Fact]
public void ItFailsWithoutMultiMemoryEnabled()
public void ItFailsWithMultiMemoryDisabled()
{
using var engine = new Engine();
using var engine = new Engine(new Config().WithMultiMemory(false));
Action action = () =>
{
using var module = Module.FromText(engine, "test", @"(module (memory 0 1) (memory 0 1))");
Expand All @@ -23,9 +22,9 @@ public void ItFailsWithoutMultiMemoryEnabled()
}

[Fact]
public void ItSucceedsWithMultiMemoryEnabled()
public void ItSucceedsWithoutMultiMemoryDisabled()
{
using var engine = new Engine(new Config().WithMultiMemory(true));
using var engine = new Engine();
using var module = Module.FromText(engine, "test", @"(module (memory 0 1) (memory 0 1))");
}
}
Expand Down
Loading