mirror of
https://github.com/nolen777/eagle0.git
synced 2026-07-29 10:55:42 +00:00
Compare commits
4
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
569ac4ed22 | ||
|
|
6780d3bb6f | ||
|
|
f1700513f9 | ||
|
|
448398396c |
@@ -5,6 +5,10 @@ common --ui_event_filters=-INFO
|
||||
|
||||
common --enable_bzlmod
|
||||
|
||||
# Bazel 9 removes native C++ rule symbols. Keep external repositories that still
|
||||
# reference C++ rules building while upstream module metadata catches up.
|
||||
common --incompatible_autoload_externally=+CcInfo,+JavaInfo,+ProtoInfo,+cc_binary,+cc_library,+cc_proto_library,+cc_test,+java_proto_library,+proto_library,+sh_test
|
||||
|
||||
# Use pre-built protoc binary instead of compiling from source
|
||||
common --incompatible_enable_proto_toolchain_resolution
|
||||
common --@com_google_protobuf//bazel/toolchains:prefer_prebuilt_protoc=true
|
||||
@@ -24,7 +28,11 @@ common --local_test_jobs=64
|
||||
common --jobs=64
|
||||
|
||||
common --cxxopt="--std=c++23"
|
||||
common --cxxopt="-Wno-unknown-warning-option"
|
||||
common --cxxopt="-Wno-character-conversion"
|
||||
common --cxxopt="-Wno-deprecated-non-prototype"
|
||||
common --per_file_copt=src/test/cpp/.*@-Wno-sign-compare
|
||||
common --per_file_copt=src/test/cpp/.*@-Wno-deprecated-enum-compare
|
||||
common --host_cxxopt="--std=c++23"
|
||||
|
||||
common --javacopt="-Xlint:-options"
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
8.5.1
|
||||
9.1.1
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
load("@bazel_gazelle//:def.bzl", "gazelle")
|
||||
load("@io_bazel_rules_go//go:def.bzl", "nogo")
|
||||
load("@rules_shell//shell:sh_test.bzl", "sh_test")
|
||||
|
||||
package(default_visibility = ["//visibility:public"])
|
||||
|
||||
|
||||
+41
-6
@@ -18,8 +18,16 @@ SLF4J_VERSION = "2.0.18"
|
||||
#
|
||||
|
||||
bazel_dep(name = "bazel_skylib", version = "1.9.0")
|
||||
bazel_dep(name = "aspect_rules_esbuild", version = "0.26.0")
|
||||
bazel_dep(name = "aspect_rules_js", version = "3.2.1")
|
||||
bazel_dep(name = "bazel_jar_jar", repo_name = "bazel_jar_jar", version = "0.1.15")
|
||||
bazel_dep(name = "platforms", version = "1.1.0")
|
||||
bazel_dep(name = "rules_dotnet", version = "0.21.5")
|
||||
bazel_dep(name = "rules_foreign_cc", version = "0.15.1")
|
||||
bazel_dep(name = "rules_android", version = "0.7.3")
|
||||
bazel_dep(name = "rules_nodejs", version = "6.7.4")
|
||||
bazel_dep(name = "rules_pkg", version = "1.2.0")
|
||||
bazel_dep(name = "rules_shell", version = "0.8.0")
|
||||
|
||||
#
|
||||
# Language Support - Scala
|
||||
@@ -31,14 +39,18 @@ scala_config = use_extension(
|
||||
"@rules_scala//scala/extensions:config.bzl",
|
||||
"scala_config",
|
||||
)
|
||||
|
||||
scala_config.settings(scala_version = SCALA_VERSION)
|
||||
|
||||
scala_deps = use_extension(
|
||||
"@rules_scala//scala/extensions:deps.bzl",
|
||||
"scala_deps",
|
||||
)
|
||||
|
||||
scala_deps.scala()
|
||||
|
||||
scala_deps.scalatest()
|
||||
|
||||
scala_deps.scala_proto()
|
||||
|
||||
#
|
||||
@@ -81,6 +93,7 @@ llvm.sysroot(
|
||||
label = "@linux_sysroot_arm64//sysroot",
|
||||
targets = ["linux-aarch64"],
|
||||
)
|
||||
|
||||
use_repo(llvm, "llvm_toolchain", "llvm_toolchain_linux", "llvm_toolchain_linux_arm64")
|
||||
|
||||
# Download the Linux sysroots (Ubuntu 24.04 Noble for C++23 support)
|
||||
@@ -106,15 +119,19 @@ sysroot(
|
||||
# Language Support - Go
|
||||
#
|
||||
|
||||
bazel_dep(name = "rules_go", version = "0.61.1", repo_name = "io_bazel_rules_go")
|
||||
bazel_dep(name = "gazelle", version = "0.51.3", repo_name = "bazel_gazelle")
|
||||
bazel_dep(name = "rules_go", repo_name = "io_bazel_rules_go", version = "0.61.1")
|
||||
bazel_dep(name = "gazelle", repo_name = "bazel_gazelle", version = "0.51.3")
|
||||
|
||||
go_sdk = use_extension("@io_bazel_rules_go//go:extensions.bzl", "go_sdk")
|
||||
|
||||
go_sdk.download(version = "1.25.11")
|
||||
|
||||
use_repo(go_sdk, "go_default_sdk")
|
||||
|
||||
go_deps = use_extension("@bazel_gazelle//:extensions.bzl", "go_deps")
|
||||
|
||||
go_deps.from_file(go_mod = "//:go.mod")
|
||||
|
||||
use_repo(
|
||||
go_deps,
|
||||
"com_github_aws_aws_sdk_go_v2",
|
||||
@@ -136,42 +153,53 @@ use_repo(
|
||||
bazel_dep(name = "rules_rust", version = "0.70.0")
|
||||
|
||||
rust = use_extension("@rules_rust//rust:extensions.bzl", "rust")
|
||||
|
||||
rust.toolchain(edition = "2021")
|
||||
|
||||
use_repo(rust, "rust_toolchains")
|
||||
|
||||
register_toolchains("@rust_toolchains//:all")
|
||||
|
||||
crate = use_extension("@rules_rust//crate_universe:extension.bzl", "crate")
|
||||
|
||||
crate.from_cargo(
|
||||
name = "map_generator_crates",
|
||||
cargo_lockfile = "//src/main/rust/net/eagle0/eagle/map_generator:Cargo.lock",
|
||||
manifests = ["//src/main/rust/net/eagle0/eagle/map_generator:Cargo.toml"],
|
||||
)
|
||||
|
||||
use_repo(crate, "map_generator_crates")
|
||||
|
||||
#
|
||||
# Platform Support - Apple/iOS
|
||||
#
|
||||
|
||||
bazel_dep(name = "apple_support", version = "1.24.5", repo_name = "build_bazel_apple_support")
|
||||
bazel_dep(name = "rules_apple", version = "4.3.3", repo_name = "build_bazel_rules_apple")
|
||||
bazel_dep(name = "apple_support", repo_name = "build_bazel_apple_support", version = "2.2.0")
|
||||
bazel_dep(name = "rules_apple", repo_name = "build_bazel_rules_apple", version = "4.5.3")
|
||||
|
||||
# Register Apple CC toolchain for Objective-C compilation
|
||||
apple_cc_configure = use_extension(
|
||||
"@build_bazel_apple_support//crosstool:setup.bzl",
|
||||
"apple_cc_configure_extension",
|
||||
)
|
||||
|
||||
use_repo(apple_cc_configure, "local_config_apple_cc", "local_config_apple_cc_toolchains")
|
||||
|
||||
#
|
||||
# Protocol Buffers & RPC
|
||||
#
|
||||
|
||||
bazel_dep(name = "protobuf", version = "33.6", repo_name = "com_google_protobuf")
|
||||
bazel_dep(name = "protobuf", repo_name = "com_google_protobuf", version = "33.6")
|
||||
|
||||
single_version_override(
|
||||
module_name = "protobuf",
|
||||
version = "33.6",
|
||||
)
|
||||
|
||||
# Use pre-built protoc binaries instead of compiling from source.
|
||||
# See: https://protobuf.dev/reference/cpp/cpp-generated/#invocation
|
||||
prebuilt_protoc = use_extension("@com_google_protobuf//bazel/private:prebuilt_protoc_extension.bzl", "protoc")
|
||||
|
||||
use_repo(
|
||||
prebuilt_protoc,
|
||||
"prebuilt_protoc.linux_aarch_64",
|
||||
@@ -195,8 +223,8 @@ bazel_dep(name = "grpc", version = "1.78.0")
|
||||
# TODO: Remove this override once a fixed grpc version is published to BCR.
|
||||
single_version_override(
|
||||
module_name = "grpc",
|
||||
patch_strip = 1,
|
||||
patches = ["//third_party/patches:grpc_fix_python_version.patch"],
|
||||
patch_strip = 1,
|
||||
version = "1.78.0",
|
||||
)
|
||||
|
||||
@@ -258,6 +286,7 @@ oci.pull(
|
||||
platforms = ["linux/amd64"],
|
||||
tag = "3.21",
|
||||
)
|
||||
|
||||
use_repo(oci, "alpine_linux", "alpine_linux_linux_amd64", "eclipse_temurin_25_jdk", "eclipse_temurin_25_jdk_linux_amd64", "eclipse_temurin_25_jre", "eclipse_temurin_25_jre_linux_amd64", "ubuntu_24_04", "ubuntu_24_04_linux_amd64", "ubuntu_24_04_linux_arm64_v8")
|
||||
|
||||
#
|
||||
@@ -268,6 +297,7 @@ bazel_dep(name = "rules_java", version = "9.6.1")
|
||||
bazel_dep(name = "rules_jvm_external", version = "6.10")
|
||||
|
||||
maven = use_extension("@rules_jvm_external//:extensions.bzl", "maven")
|
||||
|
||||
maven.install(
|
||||
artifacts = [
|
||||
# Netty
|
||||
@@ -362,18 +392,21 @@ maven.artifact(
|
||||
group = "com.google.code.gson",
|
||||
version = "2.14.0",
|
||||
)
|
||||
|
||||
maven.artifact(
|
||||
artifact = "error_prone_annotations",
|
||||
force_version = True,
|
||||
group = "com.google.errorprone",
|
||||
version = "2.50.0",
|
||||
)
|
||||
|
||||
maven.artifact(
|
||||
artifact = "guava",
|
||||
force_version = True,
|
||||
group = "com.google.guava",
|
||||
version = "33.6.0-android",
|
||||
)
|
||||
|
||||
use_repo(maven, "maven", "unpinned_maven")
|
||||
|
||||
#
|
||||
@@ -392,6 +425,8 @@ GTL_SHA = "1969c45dd76eac0dd87e9e2b65cffe358617f4fe1bcd203f72f427742537913a"
|
||||
http_archive(
|
||||
name = "gtl",
|
||||
build_file_content = """
|
||||
load("@rules_cc//cc:defs.bzl", "cc_library")
|
||||
|
||||
cc_library(
|
||||
name = "gtl",
|
||||
hdrs = glob(["include/gtl/*.hpp"]),
|
||||
|
||||
Generated
+501
-1598
File diff suppressed because it is too large
Load Diff
@@ -1,5 +1,3 @@
|
||||
load("@bazel_tools//tools/build_defs/pkg:pkg.bzl", "pkg_tar")
|
||||
|
||||
#pkg_tar(
|
||||
# name = "eagle_servers",
|
||||
# strip_prefix = "/src/main/scala/net/eagle0",
|
||||
|
||||
@@ -15,8 +15,6 @@
|
||||
"com.google.guava:failureaccess": 1582410452,
|
||||
"com.google.guava:guava": 582798237,
|
||||
"com.google.j2objc:j2objc-annotations": 2003271689,
|
||||
"com.google.protobuf:protobuf-java": -1795397632,
|
||||
"com.google.protobuf:protobuf-java-util": -1033086717,
|
||||
"com.google.re2j:re2j": 1525409503,
|
||||
"com.google.s2a.proto.v2:s2a-proto": 898932763,
|
||||
"com.google.truth:truth": 1696781452,
|
||||
@@ -100,7 +98,6 @@
|
||||
"com.google.http-client:google-http-client-gson": -1055701869,
|
||||
"com.google.j2objc:j2objc-annotations": -2074422376,
|
||||
"com.google.protobuf:protobuf-java": -1065767575,
|
||||
"com.google.protobuf:protobuf-java-util": 675279053,
|
||||
"com.google.re2j:re2j": -461460138,
|
||||
"com.google.s2a.proto.v2:s2a-proto": 1108303781,
|
||||
"com.google.truth:truth": 1427899897,
|
||||
@@ -278,7 +275,6 @@
|
||||
"com.google.api.grpc:proto-google-common-protos:2.63.1": "com.google.api.grpc:proto-google-common-protos:2.64.1",
|
||||
"com.google.guava:failureaccess:1.0.1": "com.google.guava:failureaccess:1.0.3",
|
||||
"com.google.j2objc:j2objc-annotations:2.8": "com.google.j2objc:j2objc-annotations:3.1",
|
||||
"com.google.protobuf:protobuf-java:4.27.2": "com.google.protobuf:protobuf-java:4.35.0",
|
||||
"io.netty:netty-transport-native-unix-common:4.1.127.Final": "io.netty:netty-transport-native-unix-common:4.1.135.Final",
|
||||
"io.opencensus:opencensus-api:0.31.0": "io.opencensus:opencensus-api:0.31.1",
|
||||
"org.codehaus.mojo:animal-sniffer-annotations:1.26": "org.codehaus.mojo:animal-sniffer-annotations:1.27"
|
||||
@@ -440,12 +436,6 @@
|
||||
},
|
||||
"version": "4.35.0"
|
||||
},
|
||||
"com.google.protobuf:protobuf-java-util": {
|
||||
"shasums": {
|
||||
"jar": "a2665294d3e4675482bde593df8283f8c965f0207785e8e9b223f790644f5b08"
|
||||
},
|
||||
"version": "4.27.2"
|
||||
},
|
||||
"com.google.re2j:re2j": {
|
||||
"shasums": {
|
||||
"jar": "7b52c72156dd7f98b3237a5b35c1d34fba381b21048c89208913ad80a45dfbd7"
|
||||
@@ -1518,14 +1508,6 @@
|
||||
"com.google.code.gson:gson",
|
||||
"com.google.http-client:google-http-client"
|
||||
],
|
||||
"com.google.protobuf:protobuf-java-util": [
|
||||
"com.google.code.findbugs:jsr305",
|
||||
"com.google.code.gson:gson",
|
||||
"com.google.errorprone:error_prone_annotations",
|
||||
"com.google.guava:guava",
|
||||
"com.google.j2objc:j2objc-annotations",
|
||||
"com.google.protobuf:protobuf-java"
|
||||
],
|
||||
"com.google.s2a.proto.v2:s2a-proto": [
|
||||
"io.grpc:grpc-protobuf",
|
||||
"io.grpc:grpc-stub"
|
||||
@@ -2439,9 +2421,6 @@
|
||||
"com.google.protobuf",
|
||||
"com.google.protobuf.compiler"
|
||||
],
|
||||
"com.google.protobuf:protobuf-java-util": [
|
||||
"com.google.protobuf.util"
|
||||
],
|
||||
"com.google.re2j:re2j": [
|
||||
"com.google.re2j"
|
||||
],
|
||||
@@ -4102,7 +4081,6 @@
|
||||
"com.google.http-client:google-http-client-gson",
|
||||
"com.google.j2objc:j2objc-annotations",
|
||||
"com.google.protobuf:protobuf-java",
|
||||
"com.google.protobuf:protobuf-java-util",
|
||||
"com.google.re2j:re2j",
|
||||
"com.google.s2a.proto.v2:s2a-proto",
|
||||
"com.google.truth:truth",
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
load("@rules_cc//cc:defs.bzl", "cc_library")
|
||||
load("//tools:copts.bzl", "COPTS")
|
||||
|
||||
cc_library(
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
load("@rules_cc//cc:defs.bzl", "cc_library")
|
||||
load("//tools:copts.bzl", "COPTS")
|
||||
|
||||
cc_library(
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
load("@rules_cc//cc:defs.bzl", "cc_binary", "cc_library")
|
||||
load("//tools:copts.bzl", "COPTS")
|
||||
|
||||
cc_library(
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
load("@rules_cc//cc:defs.bzl", "cc_library")
|
||||
load("//tools:copts.bzl", "COPTS")
|
||||
|
||||
cc_library(
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
load("@rules_cc//cc:defs.bzl", "cc_library")
|
||||
load("//tools:copts.bzl", "COPTS")
|
||||
|
||||
cc_library(
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
load("@rules_cc//cc:defs.bzl", "cc_library")
|
||||
load("//tools:copts.bzl", "COPTS")
|
||||
|
||||
cc_library(
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
load("@rules_cc//cc:defs.bzl", "cc_library")
|
||||
load("//tools:copts.bzl", "COPTS")
|
||||
|
||||
cc_library(
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
load("@rules_cc//cc:defs.bzl", "cc_library")
|
||||
load("//tools:copts.bzl", "COPTS")
|
||||
|
||||
# Abstract base class for score calculators
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
load("@rules_cc//cc:defs.bzl", "cc_binary", "cc_library")
|
||||
load("//tools:copts.bzl", "COPTS")
|
||||
|
||||
cc_library(
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
load("@rules_cc//cc:defs.bzl", "cc_binary", "cc_library")
|
||||
load("//tools:copts.bzl", "COPTS")
|
||||
|
||||
cc_binary(
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
load("@rules_cc//cc:defs.bzl", "cc_library")
|
||||
load("//tools:copts.bzl", "COPTS")
|
||||
|
||||
cc_library(
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
load("@rules_cc//cc:defs.bzl", "cc_library")
|
||||
load("//tools:copts.bzl", "COPTS")
|
||||
|
||||
cc_library(
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
load("@rules_cc//cc:defs.bzl", "cc_library")
|
||||
load("//tools:copts.bzl", "COPTS")
|
||||
|
||||
cc_library(
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
load("@rules_cc//cc:defs.bzl", "cc_binary", "cc_library")
|
||||
load("//tools:copts.bzl", "COPTS")
|
||||
|
||||
cc_library(
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
load("@rules_cc//cc:defs.bzl", "cc_library")
|
||||
load("//tools:copts.bzl", "COPTS")
|
||||
|
||||
cc_library(
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
load("@rules_cc//cc:defs.bzl", "cc_library")
|
||||
load("//tools:copts.bzl", "COPTS")
|
||||
|
||||
cc_library(
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
load("@rules_cc//cc:defs.bzl", "cc_library")
|
||||
load("//tools:copts.bzl", "COPTS")
|
||||
|
||||
cc_library(
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
load("@rules_cc//cc:defs.bzl", "cc_library")
|
||||
load("//tools:copts.bzl", "COPTS")
|
||||
|
||||
cc_library(
|
||||
|
||||
+1
@@ -1,3 +1,4 @@
|
||||
load("@rules_cc//cc:defs.bzl", "cc_library")
|
||||
load("//tools:copts.bzl", "COPTS")
|
||||
|
||||
cc_library(
|
||||
|
||||
+1
@@ -1,3 +1,4 @@
|
||||
load("@rules_cc//cc:defs.bzl", "cc_library")
|
||||
load("//tools:copts.bzl", "COPTS")
|
||||
|
||||
cc_library(
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
load("@rules_cc//cc:defs.bzl", "cc_library")
|
||||
load("//tools:copts.bzl", "COPTS")
|
||||
|
||||
cc_library(
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
load("@rules_cc//cc:defs.bzl", "cc_library")
|
||||
load("//tools:copts.bzl", "COPTS")
|
||||
|
||||
cc_library(
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
load("@rules_cc//cc:defs.bzl", "cc_library")
|
||||
load("//tools:copts.bzl", "COPTS")
|
||||
|
||||
cc_library(
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
load("@rules_cc//cc:defs.bzl", "cc_library")
|
||||
load("//tools:copts.bzl", "COPTS")
|
||||
|
||||
cc_library(
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
load("@rules_cc//cc:defs.bzl", "cc_library")
|
||||
load("//tools:copts.bzl", "COPTS")
|
||||
|
||||
cc_library(
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
load("@rules_cc//cc:defs.bzl", "cc_library")
|
||||
load("//tools:copts.bzl", "COPTS")
|
||||
|
||||
cc_library(
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
load("@rules_cc//cc:defs.bzl", "cc_library")
|
||||
load("//tools:copts.bzl", "COPTS")
|
||||
|
||||
cc_library(
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
load("@rules_cc//cc:defs.bzl", "cc_library")
|
||||
load("//tools:copts.bzl", "COPTS")
|
||||
|
||||
cc_library(
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
load("@rules_cc//cc:defs.bzl", "cc_library")
|
||||
load("//tools:copts.bzl", "COPTS")
|
||||
|
||||
cc_library(
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
load("@rules_cc//cc:defs.bzl", "cc_library")
|
||||
load("//tools:copts.bzl", "COPTS")
|
||||
|
||||
cc_library(
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
load("@rules_cc//cc:defs.bzl", "cc_library")
|
||||
load("//tools:copts.bzl", "COPTS")
|
||||
|
||||
cc_library(
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
load("@rules_cc//cc:defs.bzl", "cc_library")
|
||||
load("//tools:copts.bzl", "COPTS")
|
||||
|
||||
cc_library(
|
||||
|
||||
@@ -4,6 +4,8 @@
|
||||
|
||||
#include "MapLoader.hpp"
|
||||
|
||||
#include <stdexcept>
|
||||
|
||||
#include "src/main/cpp/net/eagle0/common/FilesystemUtils.hpp"
|
||||
|
||||
const std::string kShardokMapExtension = ".e0m";
|
||||
@@ -14,14 +16,18 @@ auto LoadMap(const string& mapName) -> HexMapProto {
|
||||
const byte_vector mapProtoBytes = byte_vector::FromPath(mapPath);
|
||||
|
||||
net::eagle0::shardok::common::HexMap mapProto{};
|
||||
mapProto.ParseFromArray(mapProtoBytes.data(), (int)mapProtoBytes.size());
|
||||
if (!mapProto.ParseFromArray(mapProtoBytes.data(), static_cast<int>(mapProtoBytes.size()))) {
|
||||
throw std::runtime_error("Failed to parse map proto from " + mapPath);
|
||||
}
|
||||
|
||||
return mapProto;
|
||||
}
|
||||
|
||||
auto LoadMapFromBytes(const string& mapBytes) -> HexMapProto {
|
||||
net::eagle0::shardok::common::HexMap mapProto{};
|
||||
mapProto.ParseFromString(mapBytes);
|
||||
if (!mapProto.ParseFromString(mapBytes)) {
|
||||
throw std::runtime_error("Failed to parse map proto from bytes");
|
||||
}
|
||||
|
||||
return mapProto;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
load("//tools/rules_unity3d:unity3d.bzl", "unity3d_binary")
|
||||
|
||||
#unity3d_binary(
|
||||
# name = "windows",
|
||||
# build_command = "buildWindows64Player",
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
load("@flatbuffers//:build_defs.bzl", "DEFAULT_FLATC_ARGS", "flatbuffer_cc_library")
|
||||
load("@flatbuffers//:build_defs.bzl", "flatbuffer_cc_library")
|
||||
load("@rules_cc//cc:defs.bzl", "cc_library")
|
||||
load("//tools:copts.bzl", "COPTS")
|
||||
|
||||
flatbuffer_cc_library(
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
load("@rules_java//java:defs.bzl", "java_binary")
|
||||
|
||||
java_binary(
|
||||
name = "name_generation_lambda",
|
||||
srcs = ["NameGenerationHandler.java"],
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
load("@build_bazel_rules_apple//apple:macos.bzl", "macos_bundle")
|
||||
load("@rules_cc//cc:defs.bzl", "objc_library")
|
||||
|
||||
# Native Sparkle plugin for Unity
|
||||
# This plugin initializes Sparkle auto-updater at runtime
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
load("@rules_scala//scala:scala.bzl", "scala_binary", "scala_library")
|
||||
|
||||
filegroup(
|
||||
name = "settings",
|
||||
srcs = ["settings.tsv"],
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
load("@flatbuffers//:build_defs.bzl", "DEFAULT_FLATC_ARGS", "flatbuffer_cc_library")
|
||||
load("@flatbuffers//:build_defs.bzl", "flatbuffer_cc_library")
|
||||
load("@rules_cc//cc:defs.bzl", "cc_library")
|
||||
load("//tools:copts.bzl", "COPTS")
|
||||
|
||||
filegroup(
|
||||
|
||||
@@ -2,13 +2,15 @@ load("@bazel_skylib//lib:paths.bzl", "paths")
|
||||
|
||||
def _convert_maps_impl(ctx):
|
||||
all_input_files = [
|
||||
f for t in ctx.attr.targeted_filegroups for f in t.files.to_list()
|
||||
f
|
||||
for t in ctx.attr.targeted_filegroups
|
||||
for f in t.files.to_list()
|
||||
]
|
||||
|
||||
all_outputs = []
|
||||
for f in all_input_files:
|
||||
out = ctx.actions.declare_file(paths.replace_extension(f.basename, ctx.attr.to_extension))
|
||||
all_outputs += [out]
|
||||
all_outputs.append(out)
|
||||
ctx.actions.run(
|
||||
mnemonic = "BuildMaps",
|
||||
outputs = [out],
|
||||
@@ -23,11 +25,11 @@ def _convert_maps_impl(ctx):
|
||||
|
||||
return [
|
||||
DefaultInfo(
|
||||
files=depset(all_outputs),
|
||||
runfiles=ctx.runfiles(files=all_outputs))
|
||||
files = depset(all_outputs),
|
||||
runfiles = ctx.runfiles(files = all_outputs),
|
||||
),
|
||||
]
|
||||
|
||||
|
||||
convert_maps = rule(
|
||||
implementation = _convert_maps_impl,
|
||||
attrs = {
|
||||
@@ -37,6 +39,6 @@ convert_maps = rule(
|
||||
default = Label("//src/main/go/net/eagle0/build/hex_map_json_converter"),
|
||||
executable = True,
|
||||
cfg = "exec",
|
||||
)
|
||||
),
|
||||
},
|
||||
)
|
||||
)
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
load("@bazel_skylib//lib:paths.bzl", "paths")
|
||||
|
||||
def _generate_map_info_impl(ctx):
|
||||
all_outputs = []
|
||||
out = ctx.actions.declare_file("map_info.json")
|
||||
all_outputs += [out]
|
||||
all_outputs.append(out)
|
||||
ctx.actions.run(
|
||||
mnemonic = "GenerateMapInfo",
|
||||
outputs = [out],
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
load("@rules_scala//scala:scala.bzl", "scala_binary", "scala_library")
|
||||
load("@rules_scala//scala:scala.bzl", "scala_library")
|
||||
|
||||
scala_library(
|
||||
name = "name_generator",
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
load("@rules_scala//scala:scala.bzl", "scala_library")
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
load("@rules_scala//scala:scala.bzl", "scala_binary", "scala_library")
|
||||
load("@rules_scala//scala:scala.bzl", "scala_library")
|
||||
|
||||
scala_library(
|
||||
name = "action_result_component_trait",
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
load("@rules_scala//scala:scala.bzl", "scala_binary", "scala_library")
|
||||
load("@rules_scala//scala:scala.bzl", "scala_library")
|
||||
|
||||
scala_library(
|
||||
name = "changed_province",
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
load("@rules_scala//scala:scala.bzl", "scala_binary", "scala_library")
|
||||
load("@rules_scala//scala:scala.bzl", "scala_library")
|
||||
|
||||
scala_library(
|
||||
name = "concrete",
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
load("@rules_scala//scala:scala.bzl", "scala_binary", "scala_library")
|
||||
load("@rules_scala//scala:scala.bzl", "scala_library")
|
||||
|
||||
scala_library(
|
||||
name = "action_result_concrete",
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
load("@rules_scala//scala:scala.bzl", "scala_binary", "scala_library")
|
||||
load("@rules_scala//scala:scala.bzl", "scala_library")
|
||||
|
||||
scala_library(
|
||||
name = "chronicle_event",
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
load("@rules_scala//scala:scala.bzl", "scala_binary", "scala_library")
|
||||
load("@rules_scala//scala:scala.bzl", "scala_library")
|
||||
|
||||
scala_library(
|
||||
name = "eagle_map_info_converter",
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
load("@rules_scala//scala:scala.bzl", "scala_binary", "scala_library")
|
||||
load("@rules_scala//scala:scala.bzl", "scala_library")
|
||||
|
||||
scala_library(
|
||||
name = "date",
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
load("@rules_scala//scala:scala.bzl", "scala_binary", "scala_library")
|
||||
load("@rules_scala//scala:scala.bzl", "scala_library")
|
||||
|
||||
scala_library(
|
||||
name = "diplomacy_offer",
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
load("@rules_scala//scala:scala.bzl", "scala_binary", "scala_library")
|
||||
load("@rules_scala//scala:scala.bzl", "scala_library")
|
||||
|
||||
scala_library(
|
||||
name = "chronicle_event",
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
load("@rules_scala//scala:scala.bzl", "scala_binary", "scala_library")
|
||||
load("@rules_scala//scala:scala.bzl", "scala_library")
|
||||
|
||||
scala_library(
|
||||
name = "province",
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
load("@rules_scala//scala:scala.bzl", "scala_binary", "scala_library")
|
||||
load("@rules_scala//scala:scala.bzl", "scala_library")
|
||||
|
||||
scala_library(
|
||||
name = "army",
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
load("@rules_scala//scala:scala.bzl", "scala_binary", "scala_library")
|
||||
load("@rules_scala//scala:scala.bzl", "scala_library")
|
||||
|
||||
scala_library(
|
||||
name = "concrete",
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
load("@rules_scala//scala:scala.bzl", "scala_binary", "scala_library")
|
||||
load("@rules_scala//scala:scala.bzl", "scala_library")
|
||||
|
||||
scala_library(
|
||||
name = "date",
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
load("@rules_scala//scala:scala.bzl", "scala_binary", "scala_library")
|
||||
load("@rules_scala//scala:scala.bzl", "scala_library")
|
||||
|
||||
scala_library(
|
||||
name = "diplomacy_offer",
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
load("@rules_scala//scala:scala.bzl", "scala_binary", "scala_library")
|
||||
load("@rules_scala//scala:scala.bzl", "scala_library")
|
||||
|
||||
scala_library(
|
||||
name = "status",
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
load("@rules_scala//scala:scala.bzl", "scala_binary", "scala_library")
|
||||
load("@rules_scala//scala:scala.bzl", "scala_library")
|
||||
|
||||
scala_library(
|
||||
name = "concrete",
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
load("@rules_scala//scala:scala.bzl", "scala_binary", "scala_library")
|
||||
load("@rules_scala//scala:scala.bzl", "scala_library")
|
||||
|
||||
scala_library(
|
||||
name = "eagle_appears_action",
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
load("@rules_cc//cc:defs.bzl", "cc_test")
|
||||
load("//tools:copts.bzl", "TEST_COPTS")
|
||||
|
||||
cc_test(
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
load("@flatbuffers//:build_defs.bzl", "DEFAULT_FLATC_ARGS", "flatbuffer_cc_library")
|
||||
load("@flatbuffers//:build_defs.bzl", "flatbuffer_cc_library")
|
||||
load("@rules_cc//cc:defs.bzl", "cc_test")
|
||||
|
||||
flatbuffer_cc_library(
|
||||
name = "test_fbs",
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
load("@rules_cc//cc:defs.bzl", "cc_library", "cc_test")
|
||||
load("//tools:copts.bzl", "TEST_COPTS")
|
||||
|
||||
# Mock game implementation for testing abstract MCTS
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
load("//tools:copts.bzl", "COPTS", "TEST_COPTS")
|
||||
load("@rules_cc//cc:defs.bzl", "cc_test")
|
||||
load("//tools:copts.bzl", "TEST_COPTS")
|
||||
|
||||
cc_test(
|
||||
name = "map_info_calculator_test",
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
load("@rules_cc//cc:defs.bzl", "cc_test")
|
||||
load("//tools:copts.bzl", "TEST_COPTS")
|
||||
|
||||
cc_test(
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
load("@rules_cc//cc:defs.bzl", "cc_test")
|
||||
load("//tools:copts.bzl", "TEST_COPTS")
|
||||
|
||||
cc_test(
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
load("@rules_cc//cc:defs.bzl", "cc_test")
|
||||
load("//tools:copts.bzl", "TEST_COPTS")
|
||||
|
||||
cc_test(
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
load("@rules_cc//cc:defs.bzl", "cc_test")
|
||||
load("//tools:copts.bzl", "TEST_COPTS")
|
||||
|
||||
cc_test(
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
load("@rules_cc//cc:defs.bzl", "cc_test")
|
||||
load("//tools:copts.bzl", "TEST_COPTS")
|
||||
|
||||
cc_test(
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
load("@rules_cc//cc:defs.bzl", "cc_library", "cc_test")
|
||||
load("//tools:copts.bzl", "COPTS", "TEST_COPTS")
|
||||
|
||||
cc_library(
|
||||
|
||||
@@ -387,7 +387,8 @@ auto postWithResults(
|
||||
}) -
|
||||
commands.begin();
|
||||
|
||||
EXPECT_LT(index, commands.size());
|
||||
EXPECT_GE(index, 0);
|
||||
EXPECT_LT(static_cast<size_t>(index), commands.size());
|
||||
|
||||
return postWithResults(game, playerId, index);
|
||||
}
|
||||
@@ -407,7 +408,8 @@ auto postWithResults(
|
||||
}) -
|
||||
commands.begin();
|
||||
|
||||
EXPECT_LT(index, commands.size());
|
||||
EXPECT_GE(index, 0);
|
||||
EXPECT_LT(static_cast<size_t>(index), commands.size());
|
||||
|
||||
return postWithResults(game, playerId, index, std::move(generator));
|
||||
}
|
||||
|
||||
@@ -193,7 +193,8 @@ TEST_F(ShardokEngineTests, StartGame_mageNotCasting_staysNotCasting) {
|
||||
const UnitView unit1 = game->GetUnitById(0, 0);
|
||||
EXPECT_EQ(
|
||||
unit1.attached_hero().profession_info().meteor_cast_state(),
|
||||
net::eagle0::shardok::storage::fb::MultiroundMagicState_NONE);
|
||||
static_cast<decltype(unit1.attached_hero().profession_info().meteor_cast_state())>(
|
||||
net::eagle0::shardok::storage::fb::MultiroundMagicState_NONE));
|
||||
}
|
||||
|
||||
TEST_F(ShardokEngineTests, StartRound_mageStartingMeteor_incrementsToTarget) {
|
||||
@@ -216,7 +217,8 @@ TEST_F(ShardokEngineTests, StartRound_mageStartingMeteor_incrementsToTarget) {
|
||||
const UnitView unit1 = game->GetUnitById(0, 0);
|
||||
EXPECT_EQ(
|
||||
unit1.attached_hero().profession_info().meteor_cast_state(),
|
||||
net::eagle0::shardok::storage::fb::MultiroundMagicState_TARGET);
|
||||
static_cast<decltype(unit1.attached_hero().profession_info().meteor_cast_state())>(
|
||||
net::eagle0::shardok::storage::fb::MultiroundMagicState_TARGET));
|
||||
}
|
||||
|
||||
TEST_F(ShardokEngineTests, StartRound_mageTargetingMeteor_incrementsToCast) {
|
||||
@@ -241,7 +243,8 @@ TEST_F(ShardokEngineTests, StartRound_mageTargetingMeteor_incrementsToCast) {
|
||||
const UnitView unit1 = game->GetUnitById(0, 0);
|
||||
EXPECT_EQ(
|
||||
unit1.attached_hero().profession_info().meteor_cast_state(),
|
||||
net::eagle0::shardok::storage::fb::MultiroundMagicState_CAST);
|
||||
static_cast<decltype(unit1.attached_hero().profession_info().meteor_cast_state())>(
|
||||
net::eagle0::shardok::storage::fb::MultiroundMagicState_CAST));
|
||||
}
|
||||
|
||||
TEST_F(ShardokEngineTests, GetEligibleCharger_original_returnsAbsent) {
|
||||
@@ -288,7 +291,7 @@ TEST_F(ShardokEngineTests, GetEligibleCharger_afterCharging_returnsAbsent) {
|
||||
postCommandWithTypeAndTarget(game, 0, 0, MOVE_COMMAND, Coords(2, 1));
|
||||
vector<ActionResultView> results;
|
||||
results = postCommandWithTypeAndTarget(game, 0, 0, CHARGE_COMMAND, Coords(2, 0));
|
||||
EXPECT_NE(0, results.size());
|
||||
EXPECT_NE(0u, results.size());
|
||||
|
||||
EXPECT_EQ(-1, game->GetCurrentGameState()->eligible_charger_id());
|
||||
}
|
||||
@@ -309,11 +312,11 @@ TEST_F(ShardokEngineTests, GetEligibleCharger_afterRestingHero_returnsAbsent) {
|
||||
|
||||
vector<ActionResultView> results;
|
||||
results = postCommandWithTypeAndTarget(game, 0, 0, MOVE_COMMAND, Coords(2, 1));
|
||||
EXPECT_NE(0, results.size());
|
||||
EXPECT_NE(0u, results.size());
|
||||
EXPECT_NE(-1, game->GetCurrentGameState()->eligible_charger_id());
|
||||
|
||||
results = postCommandWithType(game, 0, 0, UNIT_REST_COMMAND);
|
||||
EXPECT_NE(0, results.size());
|
||||
EXPECT_NE(0u, results.size());
|
||||
|
||||
EXPECT_EQ(-1, game->GetCurrentGameState()->eligible_charger_id());
|
||||
}
|
||||
@@ -336,11 +339,11 @@ TEST_F(ShardokEngineTests, GetEligibleCharger_afterStoppingHero_returnsAbsent) {
|
||||
|
||||
vector<ActionResultView> results;
|
||||
results = postCommandWithTypeAndTarget(game, 0, 0, MOVE_COMMAND, Coords(2, 1));
|
||||
EXPECT_NE(0, results.size());
|
||||
EXPECT_NE(0u, results.size());
|
||||
EXPECT_NE(-1, game->GetCurrentGameState()->eligible_charger_id());
|
||||
|
||||
results = postCommandWithType(game, 0, 0, UNIT_STOP_COMMAND);
|
||||
EXPECT_NE(0, results.size());
|
||||
EXPECT_NE(0u, results.size());
|
||||
|
||||
EXPECT_EQ(-1, game->GetCurrentGameState()->eligible_charger_id());
|
||||
}
|
||||
@@ -361,7 +364,7 @@ TEST_F(ShardokEngineTests, placeHero_placesHero) {
|
||||
0,
|
||||
PLACE_UNIT_COMMAND,
|
||||
ATTACKER_STARTING_POSITIONS[0][0]);
|
||||
EXPECT_EQ(1, results.size());
|
||||
EXPECT_EQ(1u, results.size());
|
||||
|
||||
const ActionResultView result = results[0];
|
||||
|
||||
@@ -396,14 +399,14 @@ TEST_F(ShardokEngineTests, placeLastHero_switchesPlayer) {
|
||||
0,
|
||||
PLACE_UNIT_COMMAND,
|
||||
ATTACKER_STARTING_POSITIONS[0][0]);
|
||||
EXPECT_NE(0, results.size());
|
||||
EXPECT_NE(0u, results.size());
|
||||
results = postCommandWithTypeAndTarget(
|
||||
game,
|
||||
0,
|
||||
1,
|
||||
PLACE_UNIT_COMMAND,
|
||||
ATTACKER_STARTING_POSITIONS[0][1]);
|
||||
EXPECT_NE(0, results.size());
|
||||
EXPECT_NE(0u, results.size());
|
||||
// post the end setup command
|
||||
postWithResults(game, 0, 0);
|
||||
|
||||
@@ -429,14 +432,14 @@ TEST_F(ShardokEngineTests, placeLastHeroBothPlayers_startsGame) {
|
||||
0,
|
||||
PLACE_UNIT_COMMAND,
|
||||
ATTACKER_STARTING_POSITIONS[0][0]);
|
||||
EXPECT_NE(0, results.size());
|
||||
EXPECT_NE(0u, results.size());
|
||||
results = postCommandWithTypeAndTarget(
|
||||
game,
|
||||
0,
|
||||
1,
|
||||
PLACE_UNIT_COMMAND,
|
||||
ATTACKER_STARTING_POSITIONS[0][1]);
|
||||
EXPECT_NE(0, results.size());
|
||||
EXPECT_NE(0u, results.size());
|
||||
|
||||
// post the end setup command
|
||||
postWithResults(game, 0, 0);
|
||||
@@ -447,7 +450,7 @@ TEST_F(ShardokEngineTests, placeLastHeroBothPlayers_startsGame) {
|
||||
2,
|
||||
PLACE_UNIT_COMMAND,
|
||||
DEFENDER_STARTING_POSITIONS[0]);
|
||||
EXPECT_NE(0, results.size());
|
||||
EXPECT_NE(0u, results.size());
|
||||
|
||||
// post the end setup command
|
||||
results = postWithResults(game, 1, 0);
|
||||
@@ -525,11 +528,17 @@ TEST_F(ShardokEngineTests, getUnitInfo_31Knowledge_mageNotFiltered) {
|
||||
EXPECT_FALSE(shouldBeFiltered.has_volleys_remaining());
|
||||
|
||||
EXPECT_EQ(
|
||||
GetUnitT1().mutable_attached_hero().mutable_profession_info().profession(),
|
||||
static_cast<decltype(shouldBeFiltered.attached_hero().profession_info().profession())>(
|
||||
GetUnitT1().mutable_attached_hero().mutable_profession_info().profession()),
|
||||
shouldBeFiltered.attached_hero().profession_info().profession());
|
||||
EXPECT_FALSE(shouldBeFiltered.attached_hero().profession_info().has_cast_target());
|
||||
EXPECT_EQ(
|
||||
GetUnitT1().mutable_attached_hero().mutable_profession_info().meteor_cast_state(),
|
||||
static_cast<decltype(shouldBeFiltered.attached_hero()
|
||||
.profession_info()
|
||||
.meteor_cast_state())>(GetUnitT1()
|
||||
.mutable_attached_hero()
|
||||
.mutable_profession_info()
|
||||
.meteor_cast_state()),
|
||||
shouldBeFiltered.attached_hero().profession_info().meteor_cast_state());
|
||||
}
|
||||
|
||||
@@ -549,11 +558,17 @@ TEST_F(ShardokEngineTests, getUnitInfo_51Knowledge_battalionStatsNotFiltered) {
|
||||
GetUnitT1().mutable_attached_hero().eagle_hero_id());
|
||||
EXPECT_FALSE(shouldBeFiltered.attached_hero().has_stats());
|
||||
EXPECT_EQ(
|
||||
GetUnitT1().mutable_attached_hero().mutable_profession_info().profession(),
|
||||
static_cast<decltype(shouldBeFiltered.attached_hero().profession_info().profession())>(
|
||||
GetUnitT1().mutable_attached_hero().mutable_profession_info().profession()),
|
||||
shouldBeFiltered.attached_hero().profession_info().profession());
|
||||
EXPECT_FALSE(shouldBeFiltered.attached_hero().profession_info().has_cast_target());
|
||||
EXPECT_EQ(
|
||||
GetUnitT1().mutable_attached_hero().mutable_profession_info().meteor_cast_state(),
|
||||
static_cast<decltype(shouldBeFiltered.attached_hero()
|
||||
.profession_info()
|
||||
.meteor_cast_state())>(GetUnitT1()
|
||||
.mutable_attached_hero()
|
||||
.mutable_profession_info()
|
||||
.meteor_cast_state()),
|
||||
shouldBeFiltered.attached_hero().profession_info().meteor_cast_state());
|
||||
EXPECT_EQ(
|
||||
shouldBeFiltered.battalion().armament().value(),
|
||||
@@ -613,11 +628,17 @@ TEST_F(ShardokEngineTests, getUnitInfo_76Knowledge_heroStatsNotFiltered) {
|
||||
GetUnitT1().mutable_attached_hero().vigor());
|
||||
EXPECT_EQ(
|
||||
shouldBeFiltered.attached_hero().profession_info().profession(),
|
||||
GetUnitT1().mutable_attached_hero().mutable_profession_info().profession());
|
||||
static_cast<decltype(shouldBeFiltered.attached_hero().profession_info().profession())>(
|
||||
GetUnitT1().mutable_attached_hero().mutable_profession_info().profession()));
|
||||
EXPECT_FALSE(shouldBeFiltered.attached_hero().profession_info().has_cast_target());
|
||||
EXPECT_EQ(
|
||||
shouldBeFiltered.attached_hero().profession_info().meteor_cast_state(),
|
||||
GetUnitT1().mutable_attached_hero().mutable_profession_info().meteor_cast_state());
|
||||
static_cast<decltype(shouldBeFiltered.attached_hero()
|
||||
.profession_info()
|
||||
.meteor_cast_state())>(GetUnitT1()
|
||||
.mutable_attached_hero()
|
||||
.mutable_profession_info()
|
||||
.meteor_cast_state()));
|
||||
EXPECT_EQ(
|
||||
shouldBeFiltered.battalion().armament().value(),
|
||||
GetUnitT1().mutable_battalion().armament());
|
||||
@@ -642,7 +663,7 @@ TEST_F(ShardokEngineTests, GetGameHistory_startMeteorLowKnowledge_filteredOut) {
|
||||
const auto game = GameWithUnits(BASIC_MAP, attackerUnits, defenderUnits);
|
||||
|
||||
const auto results = postCommandWithType(game, 0, 0, METEOR_START_COMMAND);
|
||||
EXPECT_NE(0, results.size());
|
||||
EXPECT_NE(0u, results.size());
|
||||
|
||||
auto history = game->GetFilteredGameHistory(0);
|
||||
EXPECT_CONTAINS_WHERE(history, [](const ActionResultView &result) {
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
load("@rules_cc//cc:defs.bzl", "cc_test")
|
||||
load("//tools:copts.bzl", "TEST_COPTS")
|
||||
|
||||
cc_test(
|
||||
|
||||
+3
-3
@@ -158,7 +158,7 @@ TEST_F(PlayerSetupCommandFactoryTest, unplacedDefendingRanger_canHideInForest) {
|
||||
CommandList commands{};
|
||||
factory.AddAvailablePlayerSetupCommands(commands, 1, gameState);
|
||||
|
||||
EXPECT_EQ(6 * 6, commands.size());
|
||||
EXPECT_EQ(36UL, commands.size());
|
||||
|
||||
for (int row = 0; row < 6; row++) {
|
||||
for (int column = 0; column < 6; column++) {
|
||||
@@ -187,7 +187,7 @@ TEST_F(PlayerSetupCommandFactoryTest, unplacedDefendingRanger_canHideInSwamp) {
|
||||
CommandList commands{};
|
||||
factory.AddAvailablePlayerSetupCommands(commands, 1, gameState);
|
||||
|
||||
EXPECT_EQ(6 * 6, commands.size());
|
||||
EXPECT_EQ(36UL, commands.size());
|
||||
|
||||
for (int row = 0; row < 6; row++) {
|
||||
for (int column = 0; column < 6; column++) {
|
||||
@@ -221,5 +221,5 @@ TEST_F(PlayerSetupCommandFactoryTest, unplacedDefendingRanger_cannotHideOnOccupi
|
||||
factory.AddAvailablePlayerSetupCommands(commands, 1, gameState);
|
||||
|
||||
// Can't place where the enemy is
|
||||
EXPECT_EQ(6 * 6 - 1, commands.size());
|
||||
EXPECT_EQ(35UL, commands.size());
|
||||
}
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
load("@rules_cc//cc:defs.bzl", "cc_test")
|
||||
load("//tools:copts.bzl", "TEST_COPTS")
|
||||
|
||||
cc_test(
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
load("@rules_cc//cc:defs.bzl", "cc_test")
|
||||
load("//tools:copts.bzl", "TEST_COPTS")
|
||||
|
||||
cc_test(
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
load("@rules_cc//cc:defs.bzl", "cc_test")
|
||||
load("//tools:copts.bzl", "TEST_COPTS")
|
||||
|
||||
cc_test(
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
load("@rules_cc//cc:defs.bzl", "cc_test")
|
||||
load("//tools:copts.bzl", "TEST_COPTS")
|
||||
|
||||
cc_test(
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
load("@rules_cc//cc:defs.bzl", "cc_test")
|
||||
load("//tools:copts.bzl", "TEST_COPTS")
|
||||
|
||||
cc_test(
|
||||
|
||||
+1
@@ -1,3 +1,4 @@
|
||||
load("@rules_cc//cc:defs.bzl", "cc_test")
|
||||
load("//tools:copts.bzl", "TEST_COPTS")
|
||||
|
||||
cc_test(
|
||||
|
||||
+1
@@ -1,3 +1,4 @@
|
||||
load("@rules_cc//cc:defs.bzl", "cc_test")
|
||||
load("//tools:copts.bzl", "TEST_COPTS")
|
||||
|
||||
cc_test(
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
load("@rules_cc//cc:defs.bzl", "cc_test")
|
||||
load("//tools:copts.bzl", "TEST_COPTS")
|
||||
|
||||
cc_test(
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
load("@rules_cc//cc:defs.bzl", "cc_test")
|
||||
load("//tools:copts.bzl", "TEST_COPTS")
|
||||
|
||||
cc_test(
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
load("@rules_cc//cc:defs.bzl", "cc_test")
|
||||
load("//tools:copts.bzl", "TEST_COPTS")
|
||||
|
||||
cc_test(
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
load("@rules_cc//cc:defs.bzl", "cc_test")
|
||||
load("//tools:copts.bzl", "TEST_COPTS")
|
||||
|
||||
cc_test(
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
load("@rules_cc//cc:defs.bzl", "cc_test")
|
||||
load("//tools:copts.bzl", "TEST_COPTS")
|
||||
|
||||
cc_test(
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
load("@rules_cc//cc:defs.bzl", "cc_test")
|
||||
load("//tools:copts.bzl", "TEST_COPTS")
|
||||
|
||||
cc_test(
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
load("//tools:copts.bzl", "COPTS", "TEST_COPTS")
|
||||
load("@rules_cc//cc:defs.bzl", "cc_test")
|
||||
load("//tools:copts.bzl", "TEST_COPTS")
|
||||
|
||||
cc_test(
|
||||
name = "game_state_guesser_test",
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
load("@rules_cc//cc:defs.bzl", "cc_test")
|
||||
load("//tools:copts.bzl", "TEST_COPTS")
|
||||
|
||||
cc_test(
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
load("@rules_rust//rust:defs.bzl", "rust_test")
|
||||
load("@rules_shell//shell:sh_test.bzl", "sh_test")
|
||||
|
||||
# Test that verifies the map_generator binary builds and runs
|
||||
sh_test(
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
load("@rules_scala//scala:scala.bzl", "scala_library", "scala_test")
|
||||
load("@rules_scala//scala:scala.bzl", "scala_test")
|
||||
|
||||
scala_test(
|
||||
name = "open_ai_duration_parser_test",
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
load("@rules_scala//scala:scala.bzl", "scala_library", "scala_test")
|
||||
load("@rules_scala//scala:scala.bzl", "scala_test")
|
||||
|
||||
scala_test(
|
||||
name = "string_construction_parser_test",
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
load("@rules_scala//scala:scala.bzl", "scala_library", "scala_test")
|
||||
load("@rules_scala//scala:scala.bzl", "scala_test")
|
||||
|
||||
scala_test(
|
||||
name = "sse_event_reader_test",
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user