bazel: backport java rework from main
This commit is contained in:
@@ -13,16 +13,20 @@
|
||||
|
||||
package com.google.ortools.algorithms;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertNotNull;
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertNotNull;
|
||||
|
||||
import com.google.ortools.Loader;
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.junit.runners.JUnit4;
|
||||
|
||||
/** Test the Knapsack solver java interface. */
|
||||
@RunWith(JUnit4.class)
|
||||
public final class KnapsackSolverTest {
|
||||
@BeforeEach
|
||||
@SuppressWarnings("EmptyMethods")
|
||||
@Before
|
||||
public void setUp() {
|
||||
Loader.loadNativeLibraries();
|
||||
}
|
||||
|
||||
@@ -12,8 +12,9 @@
|
||||
# limitations under the License.
|
||||
|
||||
load("@rules_cc//cc:cc_test.bzl", "cc_test")
|
||||
load("@rules_java//java:java_test.bzl", "java_test")
|
||||
load("@rules_java//java:java_binary.bzl", "java_binary")
|
||||
load("@rules_python//python:py_test.bzl", "py_test")
|
||||
load("//bazel:run_binary_test.bzl", "run_binary_test")
|
||||
|
||||
package(default_visibility = ["//visibility:public"])
|
||||
|
||||
@@ -54,13 +55,17 @@ py_test(
|
||||
deps = ["//ortools/algorithms/python:knapsack_solver"],
|
||||
)
|
||||
|
||||
java_test(
|
||||
java_binary(
|
||||
name = "Knapsack",
|
||||
srcs = ["Knapsack.java"],
|
||||
main_class = "com.google.ortools.algorithms.samples.Knapsack",
|
||||
test_class = "com.google.ortools.algorithms.samples.Knapsack",
|
||||
deps = [
|
||||
"//ortools/algorithms/java:knapsacksolver",
|
||||
"//ortools/java/com/google/ortools:Loader",
|
||||
],
|
||||
)
|
||||
|
||||
run_binary_test(
|
||||
name = "KnapsackTest",
|
||||
binary = ":Knapsack",
|
||||
)
|
||||
|
||||
@@ -14,10 +14,10 @@
|
||||
package com.google.ortools.constraintsolver;
|
||||
|
||||
import static com.google.common.truth.Truth.assertThat;
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertFalse;
|
||||
import static org.junit.jupiter.api.Assertions.assertNotNull;
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertFalse;
|
||||
import static org.junit.Assert.assertNotNull;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
|
||||
import com.google.common.collect.Iterables;
|
||||
import com.google.ortools.Loader;
|
||||
@@ -27,12 +27,16 @@ import java.util.ArrayList;
|
||||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
import java.util.function.Consumer;
|
||||
import java.util.function.Supplier;
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.junit.runners.JUnit4;
|
||||
|
||||
/** Tests the Constraint solver java interface. */
|
||||
@RunWith(JUnit4.class)
|
||||
public final class ConstraintSolverTest {
|
||||
@BeforeEach
|
||||
@SuppressWarnings("EmptyMethods")
|
||||
@Before
|
||||
public void setUp() {
|
||||
Loader.loadNativeLibraries();
|
||||
}
|
||||
|
||||
@@ -14,7 +14,6 @@
|
||||
# Description: java wrapping of the C++ code at ../
|
||||
|
||||
load("@contrib_rules_jvm//java:defs.bzl", "java_junit5_test")
|
||||
load("@rules_jvm_external//:defs.bzl", "artifact")
|
||||
load("//bazel:swig_java.bzl", "java_wrap_cc")
|
||||
|
||||
java_wrap_cc(
|
||||
@@ -35,16 +34,14 @@ java_junit5_test(
|
||||
name = "FlowTest",
|
||||
size = "small",
|
||||
srcs = ["FlowTest.java"],
|
||||
tags = ["unit"],
|
||||
test_class = "com.google.ortools.graph.FlowTest",
|
||||
deps = [
|
||||
"//ortools/graph/java:graph",
|
||||
"//ortools/java/com/google/ortools:Loader",
|
||||
"@maven//:com_google_truth_truth",
|
||||
artifact("org.junit.jupiter:junit-jupiter-api"),
|
||||
artifact("org.junit.jupiter:junit-jupiter-params"),
|
||||
artifact("org.junit.jupiter:junit-jupiter-engine"),
|
||||
artifact("org.junit.platform:junit-platform-launcher"),
|
||||
artifact("org.junit.platform:junit-platform-reporting"),
|
||||
"@maven//:org_junit_jupiter_junit_jupiter_api",
|
||||
"@maven//:org_junit_jupiter_junit_jupiter_engine",
|
||||
"@maven//:org_junit_jupiter_junit_jupiter_params",
|
||||
"@maven//:org_junit_platform_junit_platform_launcher",
|
||||
"@maven//:org_junit_platform_junit_platform_reporting",
|
||||
],
|
||||
)
|
||||
|
||||
@@ -13,16 +13,20 @@
|
||||
|
||||
package com.google.ortools.graph;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertNotNull;
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertNotNull;
|
||||
|
||||
import com.google.ortools.Loader;
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.junit.runners.JUnit4;
|
||||
|
||||
/** Test the Min/Max Flow solver java interface. */
|
||||
@RunWith(JUnit4.class)
|
||||
public final class FlowTest {
|
||||
@BeforeEach
|
||||
@SuppressWarnings("EmptyMethods")
|
||||
@Before
|
||||
public void setUp() {
|
||||
Loader.loadNativeLibraries();
|
||||
}
|
||||
|
||||
@@ -14,8 +14,9 @@
|
||||
load("@pip_deps//:requirements.bzl", "requirement")
|
||||
load("@rules_cc//cc:cc_binary.bzl", "cc_binary")
|
||||
load("@rules_cc//cc:cc_test.bzl", "cc_test")
|
||||
load("@rules_java//java:java_test.bzl", "java_test")
|
||||
load("@rules_java//java:java_binary.bzl", "java_binary")
|
||||
load("@rules_python//python:py_test.bzl", "py_test")
|
||||
load("//bazel:run_binary_test.bzl", "run_binary_test")
|
||||
|
||||
cc_test(
|
||||
name = "assignment_linear_sum_assignment_test",
|
||||
@@ -39,17 +40,21 @@ py_test(
|
||||
],
|
||||
)
|
||||
|
||||
java_test(
|
||||
java_binary(
|
||||
name = "AssignmentLinearSumAssignment",
|
||||
srcs = ["AssignmentLinearSumAssignment.java"],
|
||||
main_class = "com.google.ortools.graph.samples.AssignmentLinearSumAssignment",
|
||||
test_class = "com.google.ortools.graph.samples.AssignmentLinearSumAssignment",
|
||||
deps = [
|
||||
"//ortools/graph/java:graph",
|
||||
"//ortools/java/com/google/ortools:Loader",
|
||||
],
|
||||
)
|
||||
|
||||
run_binary_test(
|
||||
name = "AssignmentLinearSumAssignmentTest",
|
||||
binary = ":AssignmentLinearSumAssignment",
|
||||
)
|
||||
|
||||
cc_test(
|
||||
name = "assignment_min_flow_test",
|
||||
srcs = ["assignment_min_flow.cc"],
|
||||
@@ -68,17 +73,21 @@ py_test(
|
||||
deps = ["//ortools/graph/python:min_cost_flow"],
|
||||
)
|
||||
|
||||
java_test(
|
||||
java_binary(
|
||||
name = "AssignmentMinFlow",
|
||||
srcs = ["AssignmentMinFlow.java"],
|
||||
main_class = "com.google.ortools.graph.samples.AssignmentMinFlow",
|
||||
test_class = "com.google.ortools.graph.samples.AssignmentMinFlow",
|
||||
deps = [
|
||||
"//ortools/graph/java:graph",
|
||||
"//ortools/java/com/google/ortools:Loader",
|
||||
],
|
||||
)
|
||||
|
||||
run_binary_test(
|
||||
name = "AssignmentMinFlowTest",
|
||||
binary = ":AssignmentMinFlow",
|
||||
)
|
||||
|
||||
cc_test(
|
||||
name = "balance_min_flow_test",
|
||||
srcs = ["balance_min_flow.cc"],
|
||||
@@ -97,17 +106,21 @@ py_test(
|
||||
deps = ["//ortools/graph/python:min_cost_flow"],
|
||||
)
|
||||
|
||||
java_test(
|
||||
java_binary(
|
||||
name = "BalanceMinFlow",
|
||||
srcs = ["BalanceMinFlow.java"],
|
||||
main_class = "com.google.ortools.graph.samples.BalanceMinFlow",
|
||||
test_class = "com.google.ortools.graph.samples.BalanceMinFlow",
|
||||
deps = [
|
||||
"//ortools/graph/java:graph",
|
||||
"//ortools/java/com/google/ortools:Loader",
|
||||
],
|
||||
)
|
||||
|
||||
run_binary_test(
|
||||
name = "BalanceMinFlowTest",
|
||||
binary = ":BalanceMinFlow",
|
||||
)
|
||||
|
||||
cc_test(
|
||||
name = "simple_max_flow_program_test",
|
||||
srcs = ["simple_max_flow_program.cc"],
|
||||
@@ -129,17 +142,21 @@ py_test(
|
||||
],
|
||||
)
|
||||
|
||||
java_test(
|
||||
java_binary(
|
||||
name = "SimpleMaxFlowProgram",
|
||||
srcs = ["SimpleMaxFlowProgram.java"],
|
||||
main_class = "com.google.ortools.graph.samples.SimpleMaxFlowProgram",
|
||||
test_class = "com.google.ortools.graph.samples.SimpleMaxFlowProgram",
|
||||
deps = [
|
||||
"//ortools/graph/java:graph",
|
||||
"//ortools/java/com/google/ortools:Loader",
|
||||
],
|
||||
)
|
||||
|
||||
run_binary_test(
|
||||
name = "SimpleMaxFlowProgramTest",
|
||||
binary = ":SimpleMaxFlowProgram",
|
||||
)
|
||||
|
||||
cc_test(
|
||||
name = "simple_min_cost_flow_program_test",
|
||||
srcs = ["simple_min_cost_flow_program.cc"],
|
||||
@@ -161,17 +178,21 @@ py_test(
|
||||
],
|
||||
)
|
||||
|
||||
java_test(
|
||||
java_binary(
|
||||
name = "SimpleMinCostFlowProgram",
|
||||
srcs = ["SimpleMinCostFlowProgram.java"],
|
||||
main_class = "com.google.ortools.graph.samples.SimpleMinCostFlowProgram",
|
||||
test_class = "com.google.ortools.graph.samples.SimpleMinCostFlowProgram",
|
||||
deps = [
|
||||
"//ortools/graph/java:graph",
|
||||
"//ortools/java/com/google/ortools:Loader",
|
||||
],
|
||||
)
|
||||
|
||||
run_binary_test(
|
||||
name = "SimpleMinCostFlowProgramTest",
|
||||
binary = ":SimpleMinCostFlowProgram",
|
||||
)
|
||||
|
||||
cc_binary(
|
||||
name = "dijkstra_directed",
|
||||
srcs = ["dijkstra_directed.cc"],
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
|
||||
# Description: java wrapping of the C++ code at ../
|
||||
|
||||
load("@contrib_rules_jvm//java:defs.bzl", "java_junit5_test")
|
||||
load("//bazel:swig_java.bzl", "java_wrap_cc")
|
||||
|
||||
java_wrap_cc(
|
||||
@@ -27,3 +28,18 @@ java_wrap_cc(
|
||||
visibility = ["//visibility:public"],
|
||||
deps = ["//ortools/init"],
|
||||
)
|
||||
|
||||
java_junit5_test(
|
||||
name = "InitTest",
|
||||
srcs = ["InitTest.java"],
|
||||
test_class = "com.google.ortools.init.InitTest",
|
||||
deps = [
|
||||
":init",
|
||||
"//ortools/java/com/google/ortools:Loader",
|
||||
"@maven//:org_junit_jupiter_junit_jupiter_api",
|
||||
"@maven//:org_junit_jupiter_junit_jupiter_engine",
|
||||
"@maven//:org_junit_jupiter_junit_jupiter_params",
|
||||
"@maven//:org_junit_platform_junit_platform_launcher",
|
||||
"@maven//:org_junit_platform_junit_platform_reporting",
|
||||
],
|
||||
)
|
||||
|
||||
@@ -17,27 +17,20 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertNotNull;
|
||||
|
||||
import com.google.ortools.Loader;
|
||||
import com.google.ortools.init.CppBridge;
|
||||
import com.google.ortools.init.CppFlags;
|
||||
import com.google.ortools.init.OrToolsVersion;
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
/** Tests the Init java interface. */
|
||||
public final class InitTest {
|
||||
@BeforeEach
|
||||
public void setUp() {
|
||||
Loader.loadNativeLibraries();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testLogging() {
|
||||
Loader.loadNativeLibraries();
|
||||
CppBridge.initLogging("init");
|
||||
CppBridge.shutdownLogging();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testFlags() {
|
||||
Loader.loadNativeLibraries();
|
||||
final CppFlags cppFlags = new CppFlags();
|
||||
assertNotNull(cppFlags);
|
||||
cppFlags.setStderrthreshold(0);
|
||||
@@ -51,6 +44,7 @@ public final class InitTest {
|
||||
|
||||
@Test
|
||||
public void testVersion() {
|
||||
Loader.loadNativeLibraries();
|
||||
final OrToolsVersion v = new OrToolsVersion();
|
||||
assertNotNull(v);
|
||||
final int major = v.getMajorNumber();
|
||||
|
||||
@@ -14,36 +14,36 @@
|
||||
# Description: java wrapping of the C++ code at ../
|
||||
|
||||
load("@contrib_rules_jvm//java:defs.bzl", "java_junit5_test")
|
||||
load("@rules_jvm_external//:defs.bzl", "artifact")
|
||||
load("//bazel:swig_java.bzl", "java_wrap_cc")
|
||||
|
||||
java_wrap_cc(
|
||||
name = "modelbuilder",
|
||||
srcs = ["modelbuilder.swig"],
|
||||
module = "modelbuilder",
|
||||
package = "com.google.ortools.modelbuilder",
|
||||
swig_includes = [
|
||||
"//ortools/base:base_swig",
|
||||
"//ortools/util/java:vector.swig",
|
||||
],
|
||||
visibility = ["//visibility:public"],
|
||||
deps = ["//ortools/linear_solver/wrappers:model_builder_helper"],
|
||||
deps = [
|
||||
"//ortools/linear_solver:linear_solver_cc_proto",
|
||||
"//ortools/linear_solver/wrappers:model_builder_helper",
|
||||
],
|
||||
)
|
||||
|
||||
java_junit5_test(
|
||||
name = "ModelBuilderTest",
|
||||
srcs = ["ModelBuilderTest.java"],
|
||||
tags = ["unit"],
|
||||
test_class = "com.google.ortools.modelbuilder.ModelBuilderTest",
|
||||
deps = [
|
||||
"//ortools/java/com/google/ortools:Loader",
|
||||
"//ortools/java/com/google/ortools/modelbuilder",
|
||||
"//ortools/linear_solver/java:modelbuilder",
|
||||
"@maven//:com_google_truth_truth",
|
||||
artifact("org.junit.jupiter:junit-jupiter-api"),
|
||||
artifact("org.junit.jupiter:junit-jupiter-params"),
|
||||
artifact("org.junit.jupiter:junit-jupiter-engine"),
|
||||
artifact("org.junit.platform:junit-platform-launcher"),
|
||||
artifact("org.junit.platform:junit-platform-reporting"),
|
||||
"@maven//:org_junit_jupiter_junit_jupiter_api",
|
||||
"@maven//:org_junit_jupiter_junit_jupiter_engine",
|
||||
"@maven//:org_junit_jupiter_junit_jupiter_params",
|
||||
"@maven//:org_junit_platform_junit_platform_launcher",
|
||||
"@maven//:org_junit_platform_junit_platform_reporting",
|
||||
],
|
||||
)
|
||||
|
||||
@@ -14,10 +14,10 @@
|
||||
package com.google.ortools.linearsolver;
|
||||
|
||||
import static com.google.common.truth.Truth.assertThat;
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertFalse;
|
||||
import static org.junit.jupiter.api.Assertions.assertNotNull;
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertFalse;
|
||||
import static org.junit.Assert.assertNotNull;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
|
||||
import com.google.ortools.Loader;
|
||||
import com.google.ortools.linearsolver.MPConstraintProto;
|
||||
@@ -27,16 +27,20 @@ import com.google.ortools.linearsolver.MPSolutionResponse;
|
||||
import com.google.ortools.linearsolver.MPSolverResponseStatus;
|
||||
import com.google.ortools.linearsolver.MPVariableProto;
|
||||
import com.google.ortools.linearsolver.PartialVariableAssignment;
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.junit.runners.JUnit4;
|
||||
|
||||
/** Test the Linear Solver java interface. */
|
||||
@RunWith(JUnit4.class)
|
||||
public final class LinearSolverTest {
|
||||
// Numerical tolerance for checking primal, dual, objective values
|
||||
// and other values.
|
||||
private static final double NUM_TOLERANCE = 1e-5;
|
||||
|
||||
@BeforeEach
|
||||
@SuppressWarnings("EmptyMethods")
|
||||
@Before
|
||||
public void setUp() {
|
||||
Loader.loadNativeLibraries();
|
||||
}
|
||||
|
||||
@@ -17,11 +17,15 @@ import static com.google.common.truth.Truth.assertThat;
|
||||
|
||||
import com.google.ortools.Loader;
|
||||
import java.time.Duration;
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.junit.runners.JUnit4;
|
||||
|
||||
@RunWith(JUnit4.class)
|
||||
public final class ModelBuilderTest {
|
||||
@BeforeEach
|
||||
@SuppressWarnings("EmptyMethods")
|
||||
@Before
|
||||
public void setUp() {
|
||||
Loader.loadNativeLibraries();
|
||||
}
|
||||
|
||||
@@ -14,7 +14,6 @@
|
||||
# Description: java wrapping of the code in ../
|
||||
|
||||
load("@contrib_rules_jvm//java:defs.bzl", "java_junit5_test")
|
||||
load("@rules_jvm_external//:defs.bzl", "artifact")
|
||||
load("//bazel:swig_java.bzl", "java_wrap_cc")
|
||||
|
||||
java_wrap_cc(
|
||||
@@ -43,60 +42,56 @@ java_wrap_cc(
|
||||
|
||||
java_junit5_test(
|
||||
name = "CpModelTest",
|
||||
size = "medium",
|
||||
srcs = ["CpModelTest.java"],
|
||||
test_class = "com.google.ortools.sat.CpModelTest",
|
||||
deps = [
|
||||
"//ortools/java/com/google/ortools:Loader",
|
||||
"//ortools/java/com/google/ortools/sat",
|
||||
"//ortools/sat:cp_model_java_proto",
|
||||
"//ortools/sat:sat_parameters_java_proto",
|
||||
"//ortools/sat/java:sat",
|
||||
"//ortools/util/java:sorted_interval_list",
|
||||
"@maven//:com_google_truth_truth",
|
||||
artifact("org.junit.jupiter:junit-jupiter-api"),
|
||||
artifact("org.junit.jupiter:junit-jupiter-params"),
|
||||
artifact("org.junit.jupiter:junit-jupiter-engine"),
|
||||
artifact("org.junit.platform:junit-platform-launcher"),
|
||||
artifact("org.junit.platform:junit-platform-reporting"),
|
||||
"@maven//:org_junit_jupiter_junit_jupiter_api",
|
||||
"@maven//:org_junit_jupiter_junit_jupiter_engine",
|
||||
"@maven//:org_junit_jupiter_junit_jupiter_params",
|
||||
"@maven//:org_junit_platform_junit_platform_launcher",
|
||||
"@maven//:org_junit_platform_junit_platform_reporting",
|
||||
],
|
||||
)
|
||||
|
||||
java_junit5_test(
|
||||
name = "CpSolverTest",
|
||||
size = "medium",
|
||||
srcs = ["CpSolverTest.java"],
|
||||
test_class = "com.google.ortools.sat.CpSolverTest",
|
||||
deps = [
|
||||
"//ortools/java/com/google/ortools:Loader",
|
||||
"//ortools/java/com/google/ortools/sat",
|
||||
"//ortools/sat:cp_model_java_proto",
|
||||
"//ortools/sat:sat_parameters_java_proto",
|
||||
"//ortools/sat/java:sat",
|
||||
"//ortools/util/java:sorted_interval_list",
|
||||
"@maven//:com_google_truth_truth",
|
||||
artifact("org.junit.jupiter:junit-jupiter-api"),
|
||||
artifact("org.junit.jupiter:junit-jupiter-params"),
|
||||
artifact("org.junit.jupiter:junit-jupiter-engine"),
|
||||
artifact("org.junit.platform:junit-platform-launcher"),
|
||||
artifact("org.junit.platform:junit-platform-reporting"),
|
||||
"@maven//:org_junit_jupiter_junit_jupiter_api",
|
||||
"@maven//:org_junit_jupiter_junit_jupiter_engine",
|
||||
"@maven//:org_junit_jupiter_junit_jupiter_params",
|
||||
"@maven//:org_junit_platform_junit_platform_launcher",
|
||||
"@maven//:org_junit_platform_junit_platform_reporting",
|
||||
],
|
||||
)
|
||||
|
||||
java_junit5_test(
|
||||
name = "LinearExprTest",
|
||||
size = "medium",
|
||||
srcs = ["LinearExprTest.java"],
|
||||
test_class = "com.google.ortools.sat.LinearExprTest",
|
||||
deps = [
|
||||
"//ortools/java/com/google/ortools:Loader",
|
||||
"//ortools/java/com/google/ortools/sat",
|
||||
"//ortools/sat:cp_model_java_proto",
|
||||
"//ortools/sat:sat_parameters_java_proto",
|
||||
"//ortools/sat/java:sat",
|
||||
"//ortools/util/java:sorted_interval_list",
|
||||
"@maven//:com_google_truth_truth",
|
||||
artifact("org.junit.jupiter:junit-jupiter-api"),
|
||||
artifact("org.junit.jupiter:junit-jupiter-params"),
|
||||
artifact("org.junit.jupiter:junit-jupiter-engine"),
|
||||
artifact("org.junit.platform:junit-platform-launcher"),
|
||||
artifact("org.junit.platform:junit-platform-reporting"),
|
||||
"@maven//:org_junit_jupiter_junit_jupiter_api",
|
||||
"@maven//:org_junit_jupiter_junit_jupiter_engine",
|
||||
"@maven//:org_junit_jupiter_junit_jupiter_params",
|
||||
"@maven//:org_junit_platform_junit_platform_launcher",
|
||||
"@maven//:org_junit_platform_junit_platform_reporting",
|
||||
],
|
||||
)
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
package com.google.ortools.sat;
|
||||
|
||||
import static com.google.common.truth.Truth.assertThat;
|
||||
import static org.junit.jupiter.api.Assertions.assertNotNull;
|
||||
import static org.junit.Assert.assertNotNull;
|
||||
|
||||
import com.google.ortools.Loader;
|
||||
import com.google.ortools.sat.CpSolverStatus;
|
||||
@@ -27,12 +27,16 @@ import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
import java.util.function.Consumer;
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.junit.runners.JUnit4;
|
||||
|
||||
/** Tests the CpSolver java interface. */
|
||||
@RunWith(JUnit4.class)
|
||||
public final class CpModelTest {
|
||||
@BeforeEach
|
||||
@SuppressWarnings("EmptyMethods")
|
||||
@Before
|
||||
public void setUp() {
|
||||
Loader.loadNativeLibraries();
|
||||
}
|
||||
|
||||
@@ -14,19 +14,23 @@
|
||||
package com.google.ortools.sat;
|
||||
|
||||
import static com.google.common.truth.Truth.assertThat;
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertNotNull;
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertNotNull;
|
||||
|
||||
import com.google.ortools.Loader;
|
||||
import com.google.ortools.sat.CpSolverStatus;
|
||||
import com.google.ortools.util.Domain;
|
||||
import java.util.function.Consumer;
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.junit.runners.JUnit4;
|
||||
|
||||
/** Tests the CpSolver java interface. */
|
||||
@RunWith(JUnit4.class)
|
||||
public final class CpSolverTest {
|
||||
@BeforeEach
|
||||
@SuppressWarnings("EmptyMethods")
|
||||
@Before
|
||||
public void setUp() {
|
||||
Loader.loadNativeLibraries();
|
||||
}
|
||||
|
||||
@@ -14,16 +14,20 @@
|
||||
package com.google.ortools.sat;
|
||||
|
||||
import static com.google.common.truth.Truth.assertThat;
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertNotNull;
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertNotNull;
|
||||
|
||||
import com.google.ortools.Loader;
|
||||
import com.google.ortools.util.Domain;
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.junit.runners.JUnit4;
|
||||
|
||||
@RunWith(JUnit4.class)
|
||||
public final class LinearExprTest {
|
||||
@BeforeEach
|
||||
@SuppressWarnings("EmptyMethods")
|
||||
@Before
|
||||
public void setUp() {
|
||||
Loader.loadNativeLibraries();
|
||||
}
|
||||
|
||||
@@ -14,8 +14,9 @@
|
||||
load("@pip_deps//:requirements.bzl", "requirement")
|
||||
load("@rules_cc//cc:cc_test.bzl", "cc_test")
|
||||
load("@rules_go//go:def.bzl", "go_binary")
|
||||
load("@rules_java//java:java_test.bzl", "java_test")
|
||||
load("@rules_java//java:java_binary.bzl", "java_binary")
|
||||
load("@rules_python//python:py_test.bzl", "py_test")
|
||||
load("//bazel:run_binary_test.bzl", "run_binary_test")
|
||||
|
||||
py_test(
|
||||
name = "all_different_except_zero_sample_sat_py3",
|
||||
@@ -1034,417 +1035,513 @@ py_test(
|
||||
deps = ["//ortools/sat/python:cp_model"],
|
||||
)
|
||||
|
||||
java_test(
|
||||
java_binary(
|
||||
name = "AssignmentGroupsSat",
|
||||
srcs = ["AssignmentGroupsSat.java"],
|
||||
main_class = "com.google.ortools.sat.samples.AssignmentGroupsSat",
|
||||
test_class = "com.google.ortools.sat.samples.AssignmentGroupsSat",
|
||||
deps = [
|
||||
"//ortools/java/com/google/ortools:Loader",
|
||||
"//ortools/java/com/google/ortools/sat",
|
||||
"//ortools/sat:cp_model_java_proto",
|
||||
"//ortools/sat/java:sat",
|
||||
],
|
||||
)
|
||||
|
||||
java_test(
|
||||
run_binary_test(
|
||||
name = "AssignmentGroupsSatTest",
|
||||
binary = ":AssignmentGroupsSat",
|
||||
)
|
||||
|
||||
java_binary(
|
||||
name = "AssignmentSat",
|
||||
srcs = ["AssignmentSat.java"],
|
||||
main_class = "com.google.ortools.sat.samples.AssignmentSat",
|
||||
test_class = "com.google.ortools.sat.samples.AssignmentSat",
|
||||
deps = [
|
||||
"//ortools/java/com/google/ortools:Loader",
|
||||
"//ortools/java/com/google/ortools/sat",
|
||||
"//ortools/sat:cp_model_java_proto",
|
||||
"//ortools/sat/java:sat",
|
||||
],
|
||||
)
|
||||
|
||||
java_test(
|
||||
run_binary_test(
|
||||
name = "AssignmentSatTest",
|
||||
binary = ":AssignmentSat",
|
||||
)
|
||||
|
||||
java_binary(
|
||||
name = "AssignmentTaskSizesSat",
|
||||
srcs = ["AssignmentTaskSizesSat.java"],
|
||||
main_class = "com.google.ortools.sat.samples.AssignmentTaskSizesSat",
|
||||
test_class = "com.google.ortools.sat.samples.AssignmentTaskSizesSat",
|
||||
deps = [
|
||||
"//ortools/java/com/google/ortools:Loader",
|
||||
"//ortools/java/com/google/ortools/sat",
|
||||
"//ortools/sat:cp_model_java_proto",
|
||||
"//ortools/sat/java:sat",
|
||||
],
|
||||
)
|
||||
|
||||
java_test(
|
||||
run_binary_test(
|
||||
name = "AssignmentTaskSizesSatTest",
|
||||
binary = ":AssignmentTaskSizesSat",
|
||||
)
|
||||
|
||||
java_binary(
|
||||
name = "AssignmentTeamsSat",
|
||||
srcs = ["AssignmentTeamsSat.java"],
|
||||
main_class = "com.google.ortools.sat.samples.AssignmentTeamsSat",
|
||||
test_class = "com.google.ortools.sat.samples.AssignmentTeamsSat",
|
||||
deps = [
|
||||
"//ortools/java/com/google/ortools:Loader",
|
||||
"//ortools/java/com/google/ortools/sat",
|
||||
"//ortools/sat:cp_model_java_proto",
|
||||
"//ortools/sat/java:sat",
|
||||
],
|
||||
)
|
||||
|
||||
java_test(
|
||||
run_binary_test(
|
||||
name = "AssignmentTeamsSatTest",
|
||||
binary = ":AssignmentTeamsSat",
|
||||
)
|
||||
|
||||
java_binary(
|
||||
name = "AssumptionsSampleSat",
|
||||
srcs = ["AssumptionsSampleSat.java"],
|
||||
main_class = "com.google.ortools.sat.samples.AssumptionsSampleSat",
|
||||
test_class = "com.google.ortools.sat.samples.AssumptionsSampleSat",
|
||||
deps = [
|
||||
"//ortools/java/com/google/ortools:Loader",
|
||||
"//ortools/java/com/google/ortools/sat",
|
||||
"//ortools/sat:cp_model_java_proto",
|
||||
"//ortools/sat/java:sat",
|
||||
],
|
||||
)
|
||||
|
||||
java_test(
|
||||
run_binary_test(
|
||||
name = "AssumptionsSampleSatTest",
|
||||
binary = ":AssumptionsSampleSat",
|
||||
)
|
||||
|
||||
java_binary(
|
||||
name = "BinPackingProblemSat",
|
||||
srcs = ["BinPackingProblemSat.java"],
|
||||
main_class = "com.google.ortools.sat.samples.BinPackingProblemSat",
|
||||
test_class = "com.google.ortools.sat.samples.BinPackingProblemSat",
|
||||
deps = [
|
||||
"//ortools/java/com/google/ortools:Loader",
|
||||
"//ortools/java/com/google/ortools/sat",
|
||||
"//ortools/sat:cp_model_java_proto",
|
||||
"//ortools/sat/java:sat",
|
||||
],
|
||||
)
|
||||
|
||||
java_test(
|
||||
run_binary_test(
|
||||
name = "BinPackingProblemSatTest",
|
||||
binary = ":BinPackingProblemSat",
|
||||
)
|
||||
|
||||
java_binary(
|
||||
name = "BoolOrSampleSat",
|
||||
srcs = ["BoolOrSampleSat.java"],
|
||||
main_class = "com.google.ortools.sat.samples.BoolOrSampleSat",
|
||||
test_class = "com.google.ortools.sat.samples.BoolOrSampleSat",
|
||||
deps = [
|
||||
"//ortools/java/com/google/ortools:Loader",
|
||||
"//ortools/java/com/google/ortools/sat",
|
||||
"//ortools/sat/java:sat",
|
||||
],
|
||||
)
|
||||
|
||||
java_test(
|
||||
run_binary_test(
|
||||
name = "BoolOrSampleSatTest",
|
||||
binary = ":BoolOrSampleSat",
|
||||
)
|
||||
|
||||
java_binary(
|
||||
name = "ChannelingSampleSat",
|
||||
srcs = ["ChannelingSampleSat.java"],
|
||||
main_class = "com.google.ortools.sat.samples.ChannelingSampleSat",
|
||||
test_class = "com.google.ortools.sat.samples.ChannelingSampleSat",
|
||||
deps = [
|
||||
"//ortools/java/com/google/ortools:Loader",
|
||||
"//ortools/java/com/google/ortools/sat",
|
||||
"//ortools/sat:cp_model_java_proto",
|
||||
"//ortools/sat:sat_parameters_java_proto",
|
||||
"//ortools/sat/java:sat",
|
||||
],
|
||||
)
|
||||
|
||||
java_test(
|
||||
run_binary_test(
|
||||
name = "ChannelingSampleSatTest",
|
||||
binary = ":ChannelingSampleSat",
|
||||
)
|
||||
|
||||
java_binary(
|
||||
name = "CloneModelSampleSat",
|
||||
srcs = ["CloneModelSampleSat.java"],
|
||||
main_class = "com.google.ortools.sat.samples.CloneModelSampleSat",
|
||||
test_class = "com.google.ortools.sat.samples.CloneModelSampleSat",
|
||||
deps = [
|
||||
"//ortools/java/com/google/ortools:Loader",
|
||||
"//ortools/java/com/google/ortools/sat",
|
||||
"//ortools/sat:cp_model_java_proto",
|
||||
"//ortools/sat/java:sat",
|
||||
],
|
||||
)
|
||||
|
||||
java_test(
|
||||
run_binary_test(
|
||||
name = "CloneModelSampleSatTest",
|
||||
binary = ":CloneModelSampleSat",
|
||||
)
|
||||
|
||||
java_binary(
|
||||
name = "CpIsFunSat",
|
||||
srcs = ["CpIsFunSat.java"],
|
||||
main_class = "com.google.ortools.sat.samples.CpIsFunSat",
|
||||
test_class = "com.google.ortools.sat.samples.CpIsFunSat",
|
||||
deps = [
|
||||
"//ortools/java/com/google/ortools:Loader",
|
||||
"//ortools/java/com/google/ortools/sat",
|
||||
"//ortools/sat:cp_model_java_proto",
|
||||
"//ortools/sat/java:sat",
|
||||
],
|
||||
)
|
||||
|
||||
java_test(
|
||||
run_binary_test(
|
||||
name = "CpIsFunSatTest",
|
||||
binary = ":CpIsFunSat",
|
||||
)
|
||||
|
||||
java_binary(
|
||||
name = "CpSatExample",
|
||||
srcs = ["CpSatExample.java"],
|
||||
main_class = "com.google.ortools.sat.samples.CpSatExample",
|
||||
test_class = "com.google.ortools.sat.samples.CpSatExample",
|
||||
deps = [
|
||||
"//ortools/java/com/google/ortools:Loader",
|
||||
"//ortools/java/com/google/ortools/sat",
|
||||
"//ortools/sat:cp_model_java_proto",
|
||||
"//ortools/sat/java:sat",
|
||||
],
|
||||
)
|
||||
|
||||
java_test(
|
||||
run_binary_test(
|
||||
name = "CpSatExampleTest",
|
||||
binary = ":CpSatExample",
|
||||
)
|
||||
|
||||
java_binary(
|
||||
name = "EarlinessTardinessCostSampleSat",
|
||||
srcs = ["EarlinessTardinessCostSampleSat.java"],
|
||||
main_class = "com.google.ortools.sat.samples.EarlinessTardinessCostSampleSat",
|
||||
test_class = "com.google.ortools.sat.samples.EarlinessTardinessCostSampleSat",
|
||||
deps = [
|
||||
"//ortools/java/com/google/ortools:Loader",
|
||||
"//ortools/java/com/google/ortools/sat",
|
||||
"//ortools/sat:cp_model_java_proto",
|
||||
"//ortools/sat:sat_parameters_java_proto",
|
||||
"//ortools/sat/java:sat",
|
||||
],
|
||||
)
|
||||
|
||||
java_test(
|
||||
run_binary_test(
|
||||
name = "EarlinessTardinessCostSampleSatTest",
|
||||
binary = ":EarlinessTardinessCostSampleSat",
|
||||
)
|
||||
|
||||
java_binary(
|
||||
name = "IntervalSampleSat",
|
||||
srcs = ["IntervalSampleSat.java"],
|
||||
main_class = "com.google.ortools.sat.samples.IntervalSampleSat",
|
||||
test_class = "com.google.ortools.sat.samples.IntervalSampleSat",
|
||||
deps = [
|
||||
"//ortools/java/com/google/ortools:Loader",
|
||||
"//ortools/java/com/google/ortools/sat",
|
||||
"//ortools/sat/java:sat",
|
||||
],
|
||||
)
|
||||
|
||||
java_test(
|
||||
run_binary_test(
|
||||
name = "IntervalSampleSatTest",
|
||||
binary = ":IntervalSampleSat",
|
||||
)
|
||||
|
||||
java_binary(
|
||||
name = "LiteralSampleSat",
|
||||
srcs = ["LiteralSampleSat.java"],
|
||||
main_class = "com.google.ortools.sat.samples.LiteralSampleSat",
|
||||
test_class = "com.google.ortools.sat.samples.LiteralSampleSat",
|
||||
deps = [
|
||||
"//ortools/java/com/google/ortools:Loader",
|
||||
"//ortools/java/com/google/ortools/sat",
|
||||
"//ortools/sat/java:sat",
|
||||
],
|
||||
)
|
||||
|
||||
java_test(
|
||||
run_binary_test(
|
||||
name = "LiteralSampleSatTest",
|
||||
binary = ":LiteralSampleSat",
|
||||
)
|
||||
|
||||
java_binary(
|
||||
name = "MinimalJobshopSat",
|
||||
srcs = ["MinimalJobshopSat.java"],
|
||||
main_class = "com.google.ortools.sat.samples.MinimalJobshopSat",
|
||||
test_class = "com.google.ortools.sat.samples.MinimalJobshopSat",
|
||||
deps = [
|
||||
"//ortools/java/com/google/ortools:Loader",
|
||||
"//ortools/java/com/google/ortools/sat",
|
||||
"//ortools/sat:cp_model_java_proto",
|
||||
"//ortools/sat/java:sat",
|
||||
],
|
||||
)
|
||||
|
||||
java_test(
|
||||
run_binary_test(
|
||||
name = "MinimalJobshopSatTest",
|
||||
binary = ":MinimalJobshopSat",
|
||||
)
|
||||
|
||||
java_binary(
|
||||
name = "MultipleKnapsackSat",
|
||||
srcs = ["MultipleKnapsackSat.java"],
|
||||
main_class = "com.google.ortools.sat.samples.MultipleKnapsackSat",
|
||||
test_class = "com.google.ortools.sat.samples.MultipleKnapsackSat",
|
||||
deps = [
|
||||
"//ortools/java/com/google/ortools:Loader",
|
||||
"//ortools/java/com/google/ortools/sat",
|
||||
"//ortools/sat:cp_model_java_proto",
|
||||
"//ortools/sat/java:sat",
|
||||
],
|
||||
)
|
||||
|
||||
java_test(
|
||||
run_binary_test(
|
||||
name = "MultipleKnapsackSatTest",
|
||||
binary = ":MultipleKnapsackSat",
|
||||
)
|
||||
|
||||
java_binary(
|
||||
name = "NQueensSat",
|
||||
srcs = ["NQueensSat.java"],
|
||||
main_class = "com.google.ortools.sat.samples.NQueensSat",
|
||||
test_class = "com.google.ortools.sat.samples.NQueensSat",
|
||||
deps = [
|
||||
"//ortools/java/com/google/ortools:Loader",
|
||||
"//ortools/java/com/google/ortools/sat",
|
||||
"//ortools/sat:cp_model_java_proto",
|
||||
"//ortools/sat/java:sat",
|
||||
],
|
||||
)
|
||||
|
||||
java_test(
|
||||
run_binary_test(
|
||||
name = "NQueensSatTest",
|
||||
binary = ":NQueensSat",
|
||||
)
|
||||
|
||||
java_binary(
|
||||
name = "NoOverlapSampleSat",
|
||||
srcs = ["NoOverlapSampleSat.java"],
|
||||
main_class = "com.google.ortools.sat.samples.NoOverlapSampleSat",
|
||||
test_class = "com.google.ortools.sat.samples.NoOverlapSampleSat",
|
||||
deps = [
|
||||
"//ortools/java/com/google/ortools:Loader",
|
||||
"//ortools/java/com/google/ortools/sat",
|
||||
"//ortools/sat:cp_model_java_proto",
|
||||
"//ortools/sat/java:sat",
|
||||
],
|
||||
)
|
||||
|
||||
java_test(
|
||||
run_binary_test(
|
||||
name = "NoOverlapSampleSatTest",
|
||||
binary = ":NoOverlapSampleSat",
|
||||
)
|
||||
|
||||
java_binary(
|
||||
name = "NonLinearSat",
|
||||
srcs = ["NonLinearSat.java"],
|
||||
main_class = "com.google.ortools.sat.samples.NonLinearSat",
|
||||
test_class = "com.google.ortools.sat.samples.NonLinearSat",
|
||||
deps = [
|
||||
"//ortools/java/com/google/ortools:Loader",
|
||||
"//ortools/java/com/google/ortools/sat",
|
||||
"//ortools/sat:cp_model_java_proto",
|
||||
"//ortools/sat/java:sat",
|
||||
],
|
||||
)
|
||||
|
||||
java_test(
|
||||
run_binary_test(
|
||||
name = "NonLinearSatTest",
|
||||
binary = ":NonLinearSat",
|
||||
)
|
||||
|
||||
java_binary(
|
||||
name = "NursesSat",
|
||||
srcs = ["NursesSat.java"],
|
||||
main_class = "com.google.ortools.sat.samples.NursesSat",
|
||||
test_class = "com.google.ortools.sat.samples.NursesSat",
|
||||
deps = [
|
||||
"//ortools/java/com/google/ortools:Loader",
|
||||
"//ortools/java/com/google/ortools/sat",
|
||||
"//ortools/sat:cp_model_java_proto",
|
||||
"//ortools/sat/java:sat",
|
||||
],
|
||||
)
|
||||
|
||||
java_test(
|
||||
run_binary_test(
|
||||
name = "NursesSatTest",
|
||||
binary = ":NursesSat",
|
||||
)
|
||||
|
||||
java_binary(
|
||||
name = "OptionalIntervalSampleSat",
|
||||
srcs = ["OptionalIntervalSampleSat.java"],
|
||||
main_class = "com.google.ortools.sat.samples.OptionalIntervalSampleSat",
|
||||
test_class = "com.google.ortools.sat.samples.OptionalIntervalSampleSat",
|
||||
deps = [
|
||||
"//ortools/java/com/google/ortools:Loader",
|
||||
"//ortools/java/com/google/ortools/sat",
|
||||
"//ortools/sat/java:sat",
|
||||
],
|
||||
)
|
||||
|
||||
java_test(
|
||||
run_binary_test(
|
||||
name = "OptionalIntervalSampleSatTest",
|
||||
binary = ":OptionalIntervalSampleSat",
|
||||
)
|
||||
|
||||
java_binary(
|
||||
name = "RabbitsAndPheasantsSat",
|
||||
srcs = ["RabbitsAndPheasantsSat.java"],
|
||||
main_class = "com.google.ortools.sat.samples.RabbitsAndPheasantsSat",
|
||||
test_class = "com.google.ortools.sat.samples.RabbitsAndPheasantsSat",
|
||||
deps = [
|
||||
"//ortools/java/com/google/ortools:Loader",
|
||||
"//ortools/java/com/google/ortools/sat",
|
||||
"//ortools/sat:cp_model_java_proto",
|
||||
"//ortools/sat/java:sat",
|
||||
],
|
||||
)
|
||||
|
||||
java_test(
|
||||
run_binary_test(
|
||||
name = "RabbitsAndPheasantsSatTest",
|
||||
binary = ":RabbitsAndPheasantsSat",
|
||||
)
|
||||
|
||||
java_binary(
|
||||
name = "RankingSampleSat",
|
||||
srcs = ["RankingSampleSat.java"],
|
||||
main_class = "com.google.ortools.sat.samples.RankingSampleSat",
|
||||
test_class = "com.google.ortools.sat.samples.RankingSampleSat",
|
||||
deps = [
|
||||
"//ortools/java/com/google/ortools:Loader",
|
||||
"//ortools/java/com/google/ortools/sat",
|
||||
"//ortools/sat:cp_model_java_proto",
|
||||
"//ortools/sat/java:sat",
|
||||
],
|
||||
)
|
||||
|
||||
java_test(
|
||||
run_binary_test(
|
||||
name = "RankingSampleSatTest",
|
||||
binary = ":RankingSampleSat",
|
||||
)
|
||||
|
||||
java_binary(
|
||||
name = "ReifiedSampleSat",
|
||||
srcs = ["ReifiedSampleSat.java"],
|
||||
main_class = "com.google.ortools.sat.samples.ReifiedSampleSat",
|
||||
test_class = "com.google.ortools.sat.samples.ReifiedSampleSat",
|
||||
deps = [
|
||||
"//ortools/java/com/google/ortools:Loader",
|
||||
"//ortools/java/com/google/ortools/sat",
|
||||
"//ortools/sat/java:sat",
|
||||
],
|
||||
)
|
||||
|
||||
java_test(
|
||||
run_binary_test(
|
||||
name = "ReifiedSampleSatTest",
|
||||
binary = ":ReifiedSampleSat",
|
||||
)
|
||||
|
||||
java_binary(
|
||||
name = "ScheduleRequestsSat",
|
||||
srcs = ["ScheduleRequestsSat.java"],
|
||||
main_class = "com.google.ortools.sat.samples.ScheduleRequestsSat",
|
||||
test_class = "com.google.ortools.sat.samples.ScheduleRequestsSat",
|
||||
deps = [
|
||||
"//ortools/java/com/google/ortools:Loader",
|
||||
"//ortools/java/com/google/ortools/sat",
|
||||
"//ortools/sat:cp_model_java_proto",
|
||||
"//ortools/sat/java:sat",
|
||||
],
|
||||
)
|
||||
|
||||
java_test(
|
||||
run_binary_test(
|
||||
name = "ScheduleRequestsSatTest",
|
||||
binary = ":ScheduleRequestsSat",
|
||||
)
|
||||
|
||||
java_binary(
|
||||
name = "SearchForAllSolutionsSampleSat",
|
||||
srcs = ["SearchForAllSolutionsSampleSat.java"],
|
||||
main_class = "com.google.ortools.sat.samples.SearchForAllSolutionsSampleSat",
|
||||
test_class = "com.google.ortools.sat.samples.SearchForAllSolutionsSampleSat",
|
||||
deps = [
|
||||
"//ortools/java/com/google/ortools:Loader",
|
||||
"//ortools/java/com/google/ortools/sat",
|
||||
"//ortools/sat:cp_model_java_proto",
|
||||
"//ortools/sat/java:sat",
|
||||
],
|
||||
)
|
||||
|
||||
java_test(
|
||||
run_binary_test(
|
||||
name = "SearchForAllSolutionsSampleSatTest",
|
||||
binary = ":SearchForAllSolutionsSampleSat",
|
||||
)
|
||||
|
||||
java_binary(
|
||||
name = "SimpleSatProgram",
|
||||
srcs = ["SimpleSatProgram.java"],
|
||||
main_class = "com.google.ortools.sat.samples.SimpleSatProgram",
|
||||
test_class = "com.google.ortools.sat.samples.SimpleSatProgram",
|
||||
deps = [
|
||||
"//ortools/java/com/google/ortools:Loader",
|
||||
"//ortools/java/com/google/ortools/sat",
|
||||
"//ortools/sat:cp_model_java_proto",
|
||||
"//ortools/sat/java:sat",
|
||||
],
|
||||
)
|
||||
|
||||
java_test(
|
||||
run_binary_test(
|
||||
name = "SimpleSatProgramTest",
|
||||
binary = ":SimpleSatProgram",
|
||||
)
|
||||
|
||||
java_binary(
|
||||
name = "SolutionHintingSampleSat",
|
||||
srcs = ["SolutionHintingSampleSat.java"],
|
||||
main_class = "com.google.ortools.sat.samples.SolutionHintingSampleSat",
|
||||
test_class = "com.google.ortools.sat.samples.SolutionHintingSampleSat",
|
||||
deps = [
|
||||
"//ortools/java/com/google/ortools:Loader",
|
||||
"//ortools/java/com/google/ortools/sat",
|
||||
"//ortools/sat:cp_model_java_proto",
|
||||
"//ortools/sat/java:sat",
|
||||
],
|
||||
)
|
||||
|
||||
java_test(
|
||||
run_binary_test(
|
||||
name = "SolutionHintingSampleSatTest",
|
||||
binary = ":SolutionHintingSampleSat",
|
||||
)
|
||||
|
||||
java_binary(
|
||||
name = "SolveAndPrintIntermediateSolutionsSampleSat",
|
||||
srcs = ["SolveAndPrintIntermediateSolutionsSampleSat.java"],
|
||||
main_class = "com.google.ortools.sat.samples.SolveAndPrintIntermediateSolutionsSampleSat",
|
||||
test_class = "com.google.ortools.sat.samples.SolveAndPrintIntermediateSolutionsSampleSat",
|
||||
deps = [
|
||||
"//ortools/java/com/google/ortools:Loader",
|
||||
"//ortools/java/com/google/ortools/sat",
|
||||
"//ortools/sat:cp_model_java_proto",
|
||||
"//ortools/sat/java:sat",
|
||||
],
|
||||
)
|
||||
|
||||
java_test(
|
||||
run_binary_test(
|
||||
name = "SolveAndPrintIntermediateSolutionsSampleSatTest",
|
||||
binary = ":SolveAndPrintIntermediateSolutionsSampleSat",
|
||||
)
|
||||
|
||||
java_binary(
|
||||
name = "SolveWithTimeLimitSampleSat",
|
||||
srcs = ["SolveWithTimeLimitSampleSat.java"],
|
||||
main_class = "com.google.ortools.sat.samples.SolveWithTimeLimitSampleSat",
|
||||
test_class = "com.google.ortools.sat.samples.SolveWithTimeLimitSampleSat",
|
||||
deps = [
|
||||
"//ortools/java/com/google/ortools:Loader",
|
||||
"//ortools/java/com/google/ortools/sat",
|
||||
"//ortools/sat:cp_model_java_proto",
|
||||
"//ortools/sat/java:sat",
|
||||
],
|
||||
)
|
||||
|
||||
java_test(
|
||||
run_binary_test(
|
||||
name = "SolveWithTimeLimitSampleSatTest",
|
||||
binary = ":SolveWithTimeLimitSampleSat",
|
||||
)
|
||||
|
||||
java_binary(
|
||||
name = "StepFunctionSampleSat",
|
||||
srcs = ["StepFunctionSampleSat.java"],
|
||||
main_class = "com.google.ortools.sat.samples.StepFunctionSampleSat",
|
||||
test_class = "com.google.ortools.sat.samples.StepFunctionSampleSat",
|
||||
deps = [
|
||||
"//ortools/java/com/google/ortools:Loader",
|
||||
"//ortools/java/com/google/ortools/sat",
|
||||
"//ortools/sat:cp_model_java_proto",
|
||||
"//ortools/sat:sat_parameters_java_proto",
|
||||
"//ortools/sat/java:sat",
|
||||
"//ortools/util/java:sorted_interval_list",
|
||||
],
|
||||
)
|
||||
|
||||
java_test(
|
||||
run_binary_test(
|
||||
name = "StepFunctionSampleSatTest",
|
||||
binary = ":StepFunctionSampleSat",
|
||||
)
|
||||
|
||||
java_binary(
|
||||
name = "StopAfterNSolutionsSampleSat",
|
||||
srcs = ["StopAfterNSolutionsSampleSat.java"],
|
||||
main_class = "com.google.ortools.sat.samples.StopAfterNSolutionsSampleSat",
|
||||
test_class = "com.google.ortools.sat.samples.StopAfterNSolutionsSampleSat",
|
||||
deps = [
|
||||
"//ortools/java/com/google/ortools:Loader",
|
||||
"//ortools/java/com/google/ortools/sat",
|
||||
"//ortools/sat:cp_model_java_proto",
|
||||
"//ortools/sat/java:sat",
|
||||
],
|
||||
)
|
||||
|
||||
run_binary_test(
|
||||
name = "StopAfterNSolutionsSampleSatTest",
|
||||
binary = ":StopAfterNSolutionsSampleSat",
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user