Skip to content

Commit

Permalink
Fix ci fail
Browse files Browse the repository at this point in the history
  • Loading branch information
NATSUME Hiroaki committed Mar 11, 2024
1 parent 15d7cfc commit 4b33578
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 11 deletions.
1 change: 0 additions & 1 deletion Tunny.Core/Storage/StorageHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,5 @@ public static IOptunaStorage GetStorage(string path)

return storage;
}

}
}
20 changes: 10 additions & 10 deletions Tunny.CoreTests/Solver/OutputTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,41 +13,41 @@ public OutputTests()
_output = new Output("TestFile/journal.log");
}

[Fact()]
[Fact]
public void GetParetoFrontTrialTest()
{
Trial[] trials = _output.GetTargetTrial(new int[] { -1 }, "output_test");
Trial[] trials = _output.GetTargetTrial(new [] { -1 }, "output_test");
Assert.Equal(2, trials.Length);
}

[Fact()]
[Fact]
public void GetAllTargetTrialTest()
{
Trial[] trials = _output.GetTargetTrial(new int[] { -10 }, "output_test");
Trial[] trials = _output.GetTargetTrial(new [] { -10 }, "output_test");
Assert.Equal(10, trials.Length);
}

[Fact()]
[Fact]
public void GetSpecificTargetTrialTest()
{
Trial[] trials = _output.GetTargetTrial(new int[] { 3, 2, 9 }, "output_test");
Trial[] trials = _output.GetTargetTrial(new [] { 3, 2, 9 }, "output_test");
Assert.Equal(3, trials.Length);
Assert.Equal(3, trials[0].Number);
Assert.Equal(2, trials[1].Number);
Assert.Equal(9, trials[2].Number);
}

[Fact()]
[Fact]
public void GetSpecificTargetTrialWithNullTest()
{
Trial[] trials = _output.GetTargetTrial(new int[] { 100 }, "output_test");
Trial[] trials = _output.GetTargetTrial(new [] { 100 }, "output_test");
Assert.Empty(trials);
}

[Fact()]
[Fact]
public void NonExistentStudyTest()
{
Trial[] trials = _output.GetTargetTrial(new int[] { -1 }, "nonexistent_study");
Trial[] trials = _output.GetTargetTrial(new [] { -1 }, "nonexistent_study");
Assert.Empty(trials);
}
}
Expand Down

0 comments on commit 4b33578

Please sign in to comment.