Files
ortools-clone/cmake/samples/dotnet/CPSample.cs
Mizux Seiha e83cf08ce1 ci: Refactor CMake CI
* Update CMake doc
* Update Docker diagram
* Refactor CI Makefile
* Refactor and Fix <lang>.Dockerfile
* Refactor gh Docker CMake workflow
* gh CMake workflow disable fail-fast
* Remove manylinux
* Add Java samplei, generated using:
    $ mvn archetype:generate -DarchetypeArtifactId=maven-archetype-quickstart
    -> com.google.ortools
    -> sample
  note: sample still not use ortools package yet
2020-04-15 15:22:41 +02:00

25 lines
538 B
C#

using System;
using Xunit;
using Google.OrTools.ConstraintSolver;
namespace Google.OrTools.Tests {
public class ConstraintSolverTest {
[Theory]
[InlineData(false)]
[InlineData(true)]
public void SolverTest(bool callGC) {
Solver solver = new Solver("Solver");
IntVar x = solver.MakeIntVar(3, 7, "x");
if (callGC) {
GC.Collect();
}
Assert.Equal(3, x.Min());
Assert.Equal(7, x.Max());
Assert.Equal("x(3..7)", x.ToString());
}
}
} // namespace Google.Sample.Tests