-
Notifications
You must be signed in to change notification settings - Fork 132
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move conformance tests to own package (#529)
- Loading branch information
Showing
66 changed files
with
33,139 additions
and
118 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
/node_modules | ||
/bin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
.PHONY: default | ||
default: | ||
npm run generate | ||
npm run lint | ||
npm run test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
@protobuf-ts/test-conformance | ||
============================= | ||
|
||
Runs binary and JSON format conformance, using googles | ||
[conformance test runner](https://github.com/protocolbuffers/protobuf/tree/main/conformance). | ||
|
||
`@protobuf-ts/plugin-framework`, `@protobuf-ts/plugin` and `@protobuf-ts/runtime` | ||
must be built to run the tests. `make` executes all tests. See `Makefile` | ||
for details. | ||
|
||
The proto files in [proto/](./proto) are Copyright Google Inc. / Google | ||
LLC, licensed under Apache-2.0 / BSD-3-Clause. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
version: v1 | ||
plugins: | ||
- plugin: ts | ||
out: src/gen/optimize_speed-long_type_bigint | ||
opt: | ||
- long_type_bigint | ||
- optimize_speed | ||
- generate_dependencies | ||
- plugin: ts | ||
out: src/gen/optimize_speed-long_type_string | ||
opt: | ||
- long_type_string | ||
- optimize_speed | ||
- generate_dependencies | ||
- plugin: ts | ||
out: src/gen/optimize_code_size-long_type_bigint | ||
opt: | ||
- long_type_bigint | ||
- optimize_code_size | ||
- generate_dependencies | ||
- plugin: ts | ||
out: src/gen/optimize_code_size-long_type_string | ||
opt: | ||
- long_type_string | ||
- optimize_code_size | ||
- generate_dependencies |
3 changes: 3 additions & 0 deletions
3
packages/test-conformance/conformance-optimize_code_size-long_type_bigint.bash
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/usr/bin/env bash | ||
|
||
npx tsx src/conformance-optimize_code_size-long_type_bigint.ts |
3 changes: 3 additions & 0 deletions
3
packages/test-conformance/conformance-optimize_code_size-long_type_string.bash
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/usr/bin/env bash | ||
|
||
npx tsx src/conformance-optimize_code_size-long_type_string.ts |
3 changes: 3 additions & 0 deletions
3
packages/test-conformance/conformance-optimize_speed-long_type_bigint.bash
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/usr/bin/env bash | ||
|
||
npx tsx src/conformance-optimize_speed-long_type_bigint.ts |
3 changes: 3 additions & 0 deletions
3
packages/test-conformance/conformance-optimize_speed-long_type_string.bash
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/usr/bin/env bash | ||
|
||
npx tsx src/conformance-optimize_speed-long_type_string.ts |
20 changes: 20 additions & 0 deletions
20
packages/test-conformance/download-conformance-runner.bash
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#!/usr/bin/env bash | ||
|
||
if [ -f "bin/conformance_test_runner" ]; then | ||
exit 0; | ||
fi | ||
|
||
GOOGLE_PROTOBUF_VERSION=22.3 | ||
UNAME_OS=$(uname -s) | ||
if [[ "$UNAME_OS" == "Darwin" ]]; then | ||
PLATFORM=osx-x86_64 | ||
elif [[ "$UNAME_OS" == "Linux" ]]; then | ||
PLATFORM=linux-x86_64 | ||
else | ||
>&2 echo "unsupported platform ${UNAME_OS}" | ||
exit 1; | ||
fi | ||
ARCHIVE=conformance_test_runner-${GOOGLE_PROTOBUF_VERSION}-${PLATFORM}.zip | ||
curl -O -L https://github.com/bufbuild/protobuf-conformance/releases/download/v${GOOGLE_PROTOBUF_VERSION}/${ARCHIVE} | ||
unzip ${ARCHIVE} | ||
rm ${ARCHIVE} |
File renamed without changes.
File renamed without changes.
16 changes: 16 additions & 0 deletions
16
packages/test-conformance/failing_tests_optimize_speed-long_type_bigint.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
Recommended.Proto2.JsonInput.FieldNameExtension.Validator | ||
Recommended.Proto3.JsonInput.NullValueInNormalMessage.Validator | ||
Recommended.Proto3.JsonInput.NullValueInOtherOneofNewFormat.Validator | ||
Recommended.Proto3.JsonInput.NullValueInOtherOneofOldFormat.Validator | ||
Recommended.ValueRejectInfNumberValue.JsonOutput | ||
Recommended.ValueRejectNanNumberValue.JsonOutput | ||
Required.Proto3.JsonInput.DurationNegativeNanos.JsonOutput | ||
Required.Proto3.JsonInput.DurationNegativeNanos.ProtobufOutput | ||
Required.Proto3.JsonInput.EnumFieldWithAliasLowerCase.JsonOutput | ||
Required.Proto3.JsonInput.EnumFieldWithAliasLowerCase.ProtobufOutput | ||
Required.Proto3.JsonInput.EnumFieldWithAliasUseAlias.JsonOutput | ||
Required.Proto3.JsonInput.EnumFieldWithAliasUseAlias.ProtobufOutput | ||
Required.Proto3.JsonInput.OneofFieldNullFirst.JsonOutput | ||
Required.Proto3.JsonInput.OneofFieldNullFirst.ProtobufOutput | ||
Required.Proto3.JsonInput.OneofFieldNullSecond.JsonOutput | ||
Required.Proto3.JsonInput.OneofFieldNullSecond.ProtobufOutput |
16 changes: 16 additions & 0 deletions
16
packages/test-conformance/failing_tests_optimize_speed-long_type_string.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
Recommended.Proto2.JsonInput.FieldNameExtension.Validator | ||
Recommended.Proto3.JsonInput.NullValueInNormalMessage.Validator | ||
Recommended.Proto3.JsonInput.NullValueInOtherOneofNewFormat.Validator | ||
Recommended.Proto3.JsonInput.NullValueInOtherOneofOldFormat.Validator | ||
Recommended.ValueRejectInfNumberValue.JsonOutput | ||
Recommended.ValueRejectNanNumberValue.JsonOutput | ||
Required.Proto3.JsonInput.DurationNegativeNanos.JsonOutput | ||
Required.Proto3.JsonInput.DurationNegativeNanos.ProtobufOutput | ||
Required.Proto3.JsonInput.EnumFieldWithAliasLowerCase.JsonOutput | ||
Required.Proto3.JsonInput.EnumFieldWithAliasLowerCase.ProtobufOutput | ||
Required.Proto3.JsonInput.EnumFieldWithAliasUseAlias.JsonOutput | ||
Required.Proto3.JsonInput.EnumFieldWithAliasUseAlias.ProtobufOutput | ||
Required.Proto3.JsonInput.OneofFieldNullFirst.JsonOutput | ||
Required.Proto3.JsonInput.OneofFieldNullFirst.ProtobufOutput | ||
Required.Proto3.JsonInput.OneofFieldNullSecond.JsonOutput | ||
Required.Proto3.JsonInput.OneofFieldNullSecond.ProtobufOutput |
Oops, something went wrong.