Skip to content

Commit

Permalink
include all changes to integration tests
Browse files Browse the repository at this point in the history
  • Loading branch information
lukealvoeiro committed Mar 11, 2024
1 parent 24b6ac7 commit ec4725e
Show file tree
Hide file tree
Showing 33 changed files with 140 additions and 140 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,7 @@ function createBaseBoolValue(): BoolValue {

export const BoolValue = {
encode(message: BoolValue, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
if (message.value === true) {
if (message.value !== false) {
writer.uint32(8).bool(message.value);
}
return writer;
Expand Down Expand Up @@ -477,7 +477,7 @@ export const BoolValue = {

toJSON(message: BoolValue): unknown {
const obj: any = {};
if (message.value === true) {
if (message.value !== false) {
obj.value = message.value;
}
return obj;
Expand Down
4 changes: 2 additions & 2 deletions integration/bytes-node/google/protobuf/wrappers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,7 @@ function createBaseBoolValue(): BoolValue {

export const BoolValue = {
encode(message: BoolValue, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
if (message.value === true) {
if (message.value !== false) {
writer.uint32(8).bool(message.value);
}
return writer;
Expand Down Expand Up @@ -477,7 +477,7 @@ export const BoolValue = {

toJSON(message: BoolValue): unknown {
const obj: any = {};
if (message.value === true) {
if (message.value !== false) {
obj.value = message.value;
}
return obj;
Expand Down
2 changes: 1 addition & 1 deletion integration/emit-default-values-json/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ export const DefaultValuesTest = {
if (message.long !== 0) {
writer.uint32(32).int64(message.long);
}
if (message.truth === true) {
if (message.truth !== false) {
writer.uint32(40).bool(message.truth);
}
if (message.description !== "") {
Expand Down
4 changes: 2 additions & 2 deletions integration/extensions/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -522,7 +522,7 @@ export const long: Extension<Long> = {
packed: false,
encode: (value: Long): Uint8Array[] => {
const encoded: Uint8Array[] = [];
if (value !== undefined && !value.isZero()) {
if (value !== undefined && !value.equals(Long.ZERO)) {
const writer = _m0.Writer.create();
writer.int64(value);
encoded.push(writer.finish());
Expand All @@ -542,7 +542,7 @@ export const fixed: Extension<Long> = {
packed: false,
encode: (value: Long): Uint8Array[] => {
const encoded: Uint8Array[] = [];
if (value !== undefined && !value.isZero()) {
if (value !== undefined && !value.equals(Long.UZERO)) {
const writer = _m0.Writer.create();
writer.fixed64(value);
encoded.push(writer.finish());
Expand Down
4 changes: 2 additions & 2 deletions integration/global-this/global-this.ts
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ function createBaseBoolean(): Boolean {

export const Boolean = {
encode(message: Boolean, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
if (message.value === true) {
if (message.value !== false) {
writer.uint32(8).bool(message.value);
}
return writer;
Expand Down Expand Up @@ -239,7 +239,7 @@ export const Boolean = {

toJSON(message: Boolean): unknown {
const obj: any = {};
if (message.value === true) {
if (message.value !== false) {
obj.value = message.value;
}
return obj;
Expand Down
4 changes: 2 additions & 2 deletions integration/grpc-js/google/protobuf/wrappers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,7 @@ function createBaseBoolValue(): BoolValue {

export const BoolValue = {
encode(message: BoolValue, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
if (message.value === true) {
if (message.value !== false) {
writer.uint32(8).bool(message.value);
}
return writer;
Expand Down Expand Up @@ -477,7 +477,7 @@ export const BoolValue = {

toJSON(message: BoolValue): unknown {
const obj: any = {};
if (message.value === true) {
if (message.value !== false) {
obj.value = message.value;
}
return obj;
Expand Down
4 changes: 2 additions & 2 deletions integration/grpc-web/google/protobuf/wrappers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,7 @@ function createBaseBoolValue(): BoolValue {

export const BoolValue = {
encode(message: BoolValue, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
if (message.value === true) {
if (message.value !== false) {
writer.uint32(8).bool(message.value);
}
return writer;
Expand Down Expand Up @@ -477,7 +477,7 @@ export const BoolValue = {

toJSON(message: BoolValue): unknown {
const obj: any = {};
if (message.value === true) {
if (message.value !== false) {
obj.value = message.value;
}
return obj;
Expand Down
8 changes: 4 additions & 4 deletions integration/map-long-optional/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -129,10 +129,10 @@ function createBaseMapBigInt_MapEntry(): MapBigInt_MapEntry {

export const MapBigInt_MapEntry = {
encode(message: MapBigInt_MapEntry, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
if (!message.key.isZero()) {
if (!message.key.equals(Long.UZERO)) {
writer.uint32(9).fixed64(message.key);
}
if (!message.value.isZero()) {
if (!message.value.equals(Long.ZERO)) {
writer.uint32(16).int64(message.value);
}
if (message._unknownFields !== undefined) {
Expand Down Expand Up @@ -204,10 +204,10 @@ export const MapBigInt_MapEntry = {

toJSON(message: MapBigInt_MapEntry): unknown {
const obj: any = {};
if (!message.key.isZero()) {
if (!message.key.equals(Long.UZERO)) {
obj.key = (message.key || Long.UZERO).toString();
}
if (!message.value.isZero()) {
if (!message.value.equals(Long.ZERO)) {
obj.value = (message.value || Long.ZERO).toString();
}
return obj;
Expand Down
2 changes: 1 addition & 1 deletion integration/meta-typings/google/protobuf/wrappers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ function createBaseBoolValue(): BoolValue {

export const BoolValue = {
encode(message: BoolValue, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
if (message.value === true) {
if (message.value !== false) {
writer.uint32(8).bool(message.value);
}
return writer;
Expand Down
4 changes: 2 additions & 2 deletions integration/nice-grpc/google/protobuf/wrappers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,7 @@ function createBaseBoolValue(): BoolValue {

export const BoolValue = {
encode(message: BoolValue, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
if (message.value === true) {
if (message.value !== false) {
writer.uint32(8).bool(message.value);
}
return writer;
Expand Down Expand Up @@ -477,7 +477,7 @@ export const BoolValue = {

toJSON(message: BoolValue): unknown {
const obj: any = {};
if (message.value === true) {
if (message.value !== false) {
obj.value = message.value;
}
return obj;
Expand Down
4 changes: 2 additions & 2 deletions integration/omit-optionals/simple.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ function createBaseTestMessage(): TestMessage {

export const TestMessage = {
encode(message: TestMessage, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
if (message.field1 === true) {
if (message.field1 !== false) {
writer.uint32(8).bool(message.field1);
}
if (message.field2 !== undefined) {
Expand Down Expand Up @@ -62,7 +62,7 @@ export const TestMessage = {

toJSON(message: TestMessage): unknown {
const obj: any = {};
if (message.field1 === true) {
if (message.field1 !== false) {
obj.field1 = message.field1;
}
if (message.field2 !== undefined) {
Expand Down
4 changes: 2 additions & 2 deletions integration/optional-long/google/protobuf/timestamp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ function createBaseTimestamp(): Timestamp {

export const Timestamp = {
encode(message: Timestamp, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
if (message.seconds !== undefined && !message.seconds.isZero()) {
if (message.seconds !== undefined && !message.seconds.equals(Long.ZERO)) {
writer.uint32(8).int64(message.seconds);
}
if (message.nanos !== undefined && message.nanos !== 0) {
Expand Down Expand Up @@ -167,7 +167,7 @@ export const Timestamp = {

toJSON(message: Timestamp): unknown {
const obj: any = {};
if (message.seconds !== undefined && !message.seconds.isZero()) {
if (message.seconds !== undefined && !message.seconds.equals(Long.ZERO)) {
obj.seconds = (message.seconds || Long.ZERO).toString();
}
if (message.nanos !== undefined && message.nanos !== 0) {
Expand Down
54 changes: 27 additions & 27 deletions integration/options/google/protobuf/descriptor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1495,7 +1495,7 @@ export const FieldDescriptorProto = {
if (message.options !== undefined) {
FieldOptions.encode(message.options, writer.uint32(66).fork()).ldelim();
}
if (message.proto3Optional === true) {
if (message.proto3Optional !== undefined && message.proto3Optional !== false) {
writer.uint32(136).bool(message.proto3Optional);
}
return writer;
Expand Down Expand Up @@ -1900,10 +1900,10 @@ export const MethodDescriptorProto = {
if (message.options !== undefined) {
MethodOptions.encode(message.options, writer.uint32(34).fork()).ldelim();
}
if (message.clientStreaming === true) {
if (message.clientStreaming !== undefined && message.clientStreaming !== false) {
writer.uint32(40).bool(message.clientStreaming);
}
if (message.serverStreaming === true) {
if (message.serverStreaming !== undefined && message.serverStreaming !== false) {
writer.uint32(48).bool(message.serverStreaming);
}
return writer;
Expand Down Expand Up @@ -1982,7 +1982,7 @@ function createBaseFileOptions(): FileOptions {
pyGenericServices: false,
phpGenericServices: false,
deprecated: false,
ccEnableArenas: false,
ccEnableArenas: true,
objcClassPrefix: "",
csharpNamespace: "",
swiftPrefix: "",
Expand All @@ -2002,13 +2002,13 @@ export const FileOptions = {
if (message.javaOuterClassname !== undefined && message.javaOuterClassname !== "") {
writer.uint32(66).string(message.javaOuterClassname);
}
if (message.javaMultipleFiles === true) {
if (message.javaMultipleFiles !== undefined && message.javaMultipleFiles !== false) {
writer.uint32(80).bool(message.javaMultipleFiles);
}
if (message.javaGenerateEqualsAndHash === true) {
if (message.javaGenerateEqualsAndHash !== undefined && message.javaGenerateEqualsAndHash !== false) {
writer.uint32(160).bool(message.javaGenerateEqualsAndHash);
}
if (message.javaStringCheckUtf8 === true) {
if (message.javaStringCheckUtf8 !== undefined && message.javaStringCheckUtf8 !== false) {
writer.uint32(216).bool(message.javaStringCheckUtf8);
}
if (message.optimizeFor !== undefined && message.optimizeFor !== 1) {
Expand All @@ -2017,22 +2017,22 @@ export const FileOptions = {
if (message.goPackage !== undefined && message.goPackage !== "") {
writer.uint32(90).string(message.goPackage);
}
if (message.ccGenericServices === true) {
if (message.ccGenericServices !== undefined && message.ccGenericServices !== false) {
writer.uint32(128).bool(message.ccGenericServices);
}
if (message.javaGenericServices === true) {
if (message.javaGenericServices !== undefined && message.javaGenericServices !== false) {
writer.uint32(136).bool(message.javaGenericServices);
}
if (message.pyGenericServices === true) {
if (message.pyGenericServices !== undefined && message.pyGenericServices !== false) {
writer.uint32(144).bool(message.pyGenericServices);
}
if (message.phpGenericServices === true) {
if (message.phpGenericServices !== undefined && message.phpGenericServices !== false) {
writer.uint32(336).bool(message.phpGenericServices);
}
if (message.deprecated === true) {
if (message.deprecated !== undefined && message.deprecated !== false) {
writer.uint32(184).bool(message.deprecated);
}
if (message.ccEnableArenas === true) {
if (message.ccEnableArenas !== undefined && message.ccEnableArenas !== true) {
writer.uint32(248).bool(message.ccEnableArenas);
}
if (message.objcClassPrefix !== undefined && message.objcClassPrefix !== "") {
Expand Down Expand Up @@ -2238,16 +2238,16 @@ function createBaseMessageOptions(): MessageOptions {

export const MessageOptions = {
encode(message: MessageOptions, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
if (message.messageSetWireFormat === true) {
if (message.messageSetWireFormat !== undefined && message.messageSetWireFormat !== false) {
writer.uint32(8).bool(message.messageSetWireFormat);
}
if (message.noStandardDescriptorAccessor === true) {
if (message.noStandardDescriptorAccessor !== undefined && message.noStandardDescriptorAccessor !== false) {
writer.uint32(16).bool(message.noStandardDescriptorAccessor);
}
if (message.deprecated === true) {
if (message.deprecated !== undefined && message.deprecated !== false) {
writer.uint32(24).bool(message.deprecated);
}
if (message.mapEntry === true) {
if (message.mapEntry !== undefined && message.mapEntry !== false) {
writer.uint32(56).bool(message.mapEntry);
}
for (const v of message.uninterpretedOption) {
Expand Down Expand Up @@ -2317,19 +2317,19 @@ export const FieldOptions = {
if (message.ctype !== undefined && message.ctype !== 0) {
writer.uint32(8).int32(message.ctype);
}
if (message.packed === true) {
if (message.packed !== undefined && message.packed !== false) {
writer.uint32(16).bool(message.packed);
}
if (message.jstype !== undefined && message.jstype !== 0) {
writer.uint32(48).int32(message.jstype);
}
if (message.lazy === true) {
if (message.lazy !== undefined && message.lazy !== false) {
writer.uint32(40).bool(message.lazy);
}
if (message.deprecated === true) {
if (message.deprecated !== undefined && message.deprecated !== false) {
writer.uint32(24).bool(message.deprecated);
}
if (message.weak === true) {
if (message.weak !== undefined && message.weak !== false) {
writer.uint32(80).bool(message.weak);
}
for (const v of message.uninterpretedOption) {
Expand Down Expand Up @@ -2446,10 +2446,10 @@ function createBaseEnumOptions(): EnumOptions {

export const EnumOptions = {
encode(message: EnumOptions, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
if (message.allowAlias === true) {
if (message.allowAlias !== undefined && message.allowAlias !== false) {
writer.uint32(16).bool(message.allowAlias);
}
if (message.deprecated === true) {
if (message.deprecated !== undefined && message.deprecated !== false) {
writer.uint32(24).bool(message.deprecated);
}
for (const v of message.uninterpretedOption) {
Expand Down Expand Up @@ -2502,7 +2502,7 @@ function createBaseEnumValueOptions(): EnumValueOptions {

export const EnumValueOptions = {
encode(message: EnumValueOptions, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
if (message.deprecated === true) {
if (message.deprecated !== undefined && message.deprecated !== false) {
writer.uint32(8).bool(message.deprecated);
}
for (const v of message.uninterpretedOption) {
Expand Down Expand Up @@ -2548,7 +2548,7 @@ function createBaseServiceOptions(): ServiceOptions {

export const ServiceOptions = {
encode(message: ServiceOptions, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
if (message.deprecated === true) {
if (message.deprecated !== undefined && message.deprecated !== false) {
writer.uint32(264).bool(message.deprecated);
}
for (const v of message.uninterpretedOption) {
Expand Down Expand Up @@ -2594,7 +2594,7 @@ function createBaseMethodOptions(): MethodOptions {

export const MethodOptions = {
encode(message: MethodOptions, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
if (message.deprecated === true) {
if (message.deprecated !== undefined && message.deprecated !== false) {
writer.uint32(264).bool(message.deprecated);
}
if (message.idempotencyLevel !== undefined && message.idempotencyLevel !== 0) {
Expand Down Expand Up @@ -2757,7 +2757,7 @@ export const UninterpretedOption_NamePart = {
if (message.namePart !== "") {
writer.uint32(10).string(message.namePart);
}
if (message.isExtension === true) {
if (message.isExtension !== false) {
writer.uint32(16).bool(message.isExtension);
}
return writer;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ export const UInt32Value = {

export const BoolValue = {
encode(message: BoolValue, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
if (message.value === true) {
if (message.value !== false) {
writer.uint32(8).bool(message.value);
}
return writer;
Expand Down
2 changes: 1 addition & 1 deletion integration/output-encode-only/google/protobuf/wrappers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ function createBaseBoolValue(): BoolValue {

export const BoolValue = {
encode(message: BoolValue, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
if (message.value === true) {
if (message.value !== false) {
writer.uint32(8).bool(message.value);
}
return writer;
Expand Down
Loading

0 comments on commit ec4725e

Please sign in to comment.