ADD: added new version of protobuf
This commit is contained in:
@@ -140,7 +140,7 @@ internal_gen_kt_protos(
|
||||
internal_gen_kt_protos(
|
||||
name = "gen_kotlin_unittest_lite",
|
||||
lite = True,
|
||||
deps = ["//src/google/protobuf:lite_test_protos"],
|
||||
deps = ["//:kt_unittest_lite"],
|
||||
)
|
||||
|
||||
kt_jvm_library(
|
||||
@@ -152,7 +152,6 @@ kt_jvm_library(
|
||||
deps = [
|
||||
":evil_names_proto2_java_proto_lite",
|
||||
"//java/core:generic_test_protos_java_proto_lite",
|
||||
"//java/core:lite_test_protos_java_proto_lite",
|
||||
"//java/kotlin:only_for_use_in_proto_generated_code_its_generator_and_tests",
|
||||
"//java/kotlin:shared_runtime",
|
||||
"//java/lite",
|
||||
@@ -162,7 +161,7 @@ kt_jvm_library(
|
||||
internal_gen_kt_protos(
|
||||
name = "gen_kotlin_proto3_unittest_lite",
|
||||
lite = True,
|
||||
deps = ["//src/google/protobuf:kt_proto3_unittest_protos"],
|
||||
deps = ["//:kt_proto3_unittest"],
|
||||
)
|
||||
|
||||
kt_jvm_library(
|
||||
@@ -176,7 +175,6 @@ kt_jvm_library(
|
||||
":evil_names_proto3_java_proto_lite",
|
||||
":multiple_files_proto3_java_proto_lite",
|
||||
"//java/core:generic_test_protos_java_proto_lite",
|
||||
"//java/core:lite_test_protos_java_proto_lite",
|
||||
"//java/kotlin:only_for_use_in_proto_generated_code_its_generator_and_tests",
|
||||
"//java/kotlin:shared_runtime",
|
||||
"//java/lite",
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>com.google.protobuf</groupId>
|
||||
<artifactId>protobuf-parent</artifactId>
|
||||
<version>3.21.8</version>
|
||||
<version>3.21.12</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>protobuf-kotlin-lite</artifactId>
|
||||
|
||||
@@ -46,6 +46,13 @@ import com.google.protobuf.UnittestLite.TestEmptyMessageLite
|
||||
import com.google.protobuf.UnittestLite.TestEmptyMessageWithExtensionsLite
|
||||
import com.google.protobuf.copy
|
||||
import com.google.protobuf.foreignMessageLite
|
||||
import com.google.protobuf.kotlin.generator.EvilNamesProto2OuterClass.EvilNamesProto2
|
||||
import com.google.protobuf.kotlin.generator.EvilNamesProto2OuterClass.HardKeywordsAllTypesProto2
|
||||
import com.google.protobuf.kotlin.generator.EvilNamesProto2OuterClass.Interface
|
||||
import com.google.protobuf.kotlin.generator.HardKeywordsAllTypesProto2Kt
|
||||
import com.google.protobuf.kotlin.generator.evilNamesProto2
|
||||
import com.google.protobuf.kotlin.generator.hardKeywordsAllTypesProto2
|
||||
import com.google.protobuf.kotlin.generator.interface_
|
||||
import com.google.protobuf.optionalGroupExtensionLite
|
||||
import com.google.protobuf.repeatedGroupExtensionLite
|
||||
import com.google.protobuf.testAllExtensionsLite
|
||||
@@ -55,13 +62,6 @@ import com.google.protobuf.testEmptyMessageWithExtensionsLite
|
||||
import protobuf_unittest.MapLiteUnittest.MapEnumLite
|
||||
import protobuf_unittest.MapLiteUnittest.TestMapLite
|
||||
import protobuf_unittest.testMapLite
|
||||
import `in`.com.google.protobuf.kotlin.generator.EvilNamesProto2OuterClass.EvilNamesProto2
|
||||
import `in`.com.google.protobuf.kotlin.generator.EvilNamesProto2OuterClass.HardKeywordsAllTypesProto2
|
||||
import `in`.com.google.protobuf.kotlin.generator.EvilNamesProto2OuterClass.Interface
|
||||
import `in`.com.google.protobuf.kotlin.generator.HardKeywordsAllTypesProto2Kt
|
||||
import `in`.com.google.protobuf.kotlin.generator.evilNamesProto2
|
||||
import `in`.com.google.protobuf.kotlin.generator.hardKeywordsAllTypesProto2
|
||||
import `in`.com.google.protobuf.kotlin.generator.interface_
|
||||
import org.junit.Test
|
||||
import org.junit.runner.RunWith
|
||||
import org.junit.runners.JUnit4
|
||||
@@ -178,7 +178,6 @@ class Proto2LiteTest {
|
||||
.isEqualTo(TestUtilLite.getAllLiteSetBuilder().build())
|
||||
}
|
||||
|
||||
@Suppress("CheckResult")
|
||||
@Test
|
||||
fun testGetters() {
|
||||
testAllTypesLite {
|
||||
@@ -199,7 +198,6 @@ class Proto2LiteTest {
|
||||
}
|
||||
}
|
||||
|
||||
@Suppress("CheckResult")
|
||||
@Test
|
||||
fun testDefaultGetters() {
|
||||
testAllTypesLite {
|
||||
@@ -210,7 +208,6 @@ class Proto2LiteTest {
|
||||
}
|
||||
}
|
||||
|
||||
@Suppress("CheckResult")
|
||||
@Test
|
||||
fun testRepeatedGettersAndSetters() {
|
||||
testAllTypesLite {
|
||||
@@ -301,7 +298,6 @@ class Proto2LiteTest {
|
||||
}
|
||||
}
|
||||
|
||||
@Suppress("CheckResult")
|
||||
@Test
|
||||
fun testHazzers() {
|
||||
testAllTypesLite {
|
||||
@@ -332,7 +328,6 @@ class Proto2LiteTest {
|
||||
}
|
||||
}
|
||||
|
||||
@Suppress("CheckResult")
|
||||
@Test
|
||||
fun testClears() {
|
||||
testAllTypesLite {
|
||||
@@ -525,7 +520,6 @@ class Proto2LiteTest {
|
||||
.isEqualTo(TestUtilLite.getAllLiteExtensionsSet())
|
||||
}
|
||||
|
||||
@Suppress("CheckResult")
|
||||
@Test
|
||||
fun testExtensionGetters() {
|
||||
testAllExtensionsLite {
|
||||
@@ -549,7 +543,6 @@ class Proto2LiteTest {
|
||||
}
|
||||
}
|
||||
|
||||
@Suppress("CheckResult")
|
||||
@Test
|
||||
fun testRepeatedExtensionGettersAndSetters() {
|
||||
testAllExtensionsLite {
|
||||
@@ -639,7 +632,6 @@ class Proto2LiteTest {
|
||||
}
|
||||
}
|
||||
|
||||
@Suppress("CheckResult")
|
||||
@Test
|
||||
fun testExtensionContains() {
|
||||
testAllExtensionsLite {
|
||||
@@ -671,7 +663,6 @@ class Proto2LiteTest {
|
||||
}
|
||||
}
|
||||
|
||||
@Suppress("CheckResult")
|
||||
@Test
|
||||
fun testExtensionClears() {
|
||||
testAllExtensionsLite {
|
||||
@@ -760,7 +751,6 @@ class Proto2LiteTest {
|
||||
)
|
||||
}
|
||||
|
||||
@Suppress("CheckResult")
|
||||
@Test
|
||||
fun testMapGettersAndSetters() {
|
||||
testMapLite {
|
||||
@@ -816,7 +806,6 @@ class Proto2LiteTest {
|
||||
}
|
||||
}
|
||||
|
||||
@Suppress("CheckResult")
|
||||
@Test
|
||||
fun testMapRemove() {
|
||||
testMapLite {
|
||||
@@ -842,7 +831,6 @@ class Proto2LiteTest {
|
||||
}
|
||||
}
|
||||
|
||||
@Suppress("CheckResult")
|
||||
@Test
|
||||
fun testMapClear() {
|
||||
testMapLite {
|
||||
@@ -889,6 +877,7 @@ class Proto2LiteTest {
|
||||
boolean = 1L
|
||||
sealed = "foo"
|
||||
interface_ = 1F
|
||||
in_ = 1
|
||||
object_ = "foo"
|
||||
cachedSize_ = "foo"
|
||||
serializedSize_ = true
|
||||
@@ -914,6 +903,7 @@ class Proto2LiteTest {
|
||||
.setBoolean(1L)
|
||||
.setSealed("foo")
|
||||
.setInterface(1F)
|
||||
.setIn(1)
|
||||
.setObject("foo")
|
||||
.setCachedSize_("foo")
|
||||
.setSerializedSize_(true)
|
||||
@@ -924,13 +914,15 @@ class Proto2LiteTest {
|
||||
assertThat(interface_ {}).isEqualTo(Interface.newBuilder().build())
|
||||
}
|
||||
|
||||
@Suppress("CheckResult")
|
||||
@Test
|
||||
fun testHardKeywordGettersAndSetters() {
|
||||
hardKeywordsAllTypesProto2 {
|
||||
as_ = 1
|
||||
assertThat(as_).isEqualTo(1)
|
||||
|
||||
in_ = "foo"
|
||||
assertThat(in_).isEqualTo("foo")
|
||||
|
||||
break_ = HardKeywordsAllTypesProto2.NestedEnum.FOO
|
||||
assertThat(break_).isEqualTo(HardKeywordsAllTypesProto2.NestedEnum.FOO)
|
||||
|
||||
@@ -954,13 +946,15 @@ class Proto2LiteTest {
|
||||
}
|
||||
}
|
||||
|
||||
@Suppress("CheckResult")
|
||||
@Test
|
||||
fun testHardKeywordHazzers() {
|
||||
hardKeywordsAllTypesProto2 {
|
||||
as_ = 1
|
||||
assertThat(hasAs_()).isTrue()
|
||||
|
||||
in_ = "foo"
|
||||
assertThat(hasIn_()).isTrue()
|
||||
|
||||
break_ = HardKeywordsAllTypesProto2.NestedEnum.FOO
|
||||
assertThat(hasBreak_()).isTrue()
|
||||
|
||||
@@ -969,7 +963,6 @@ class Proto2LiteTest {
|
||||
}
|
||||
}
|
||||
|
||||
@Suppress("CheckResult")
|
||||
@Test
|
||||
fun testHardKeywordClears() {
|
||||
hardKeywordsAllTypesProto2 {
|
||||
@@ -977,6 +970,10 @@ class Proto2LiteTest {
|
||||
clearAs_()
|
||||
assertThat(hasAs_()).isFalse()
|
||||
|
||||
in_ = "foo"
|
||||
clearIn_()
|
||||
assertThat(hasIn_()).isFalse()
|
||||
|
||||
break_ = HardKeywordsAllTypesProto2.NestedEnum.FOO
|
||||
clearBreak_()
|
||||
assertThat(hasBreak_()).isFalse()
|
||||
|
||||
Reference in New Issue
Block a user