From 67f42234fdf7258288df1978fdee9ae894866d90 Mon Sep 17 00:00:00 2001 From: Jeongho Nam Date: Sat, 19 Oct 2024 23:43:29 +0900 Subject: [PATCH] Add failure test cases for `Sequence` --- ...r_protobuf_sequence_property_duplicated.ts | 27 + ...rror_protobuf_sequence_union_duplicated.ts | 32 + .../error_protobuf_sequence_union_omitted.ts | 29 + package.json | 1 + .../protobuf/ObjectSequenceProtobuf.proto | 27 + .../reflect/metadata/ObjectHttpNullable.json | 6 +- .../metadata/ObjectHttpUndefindable.json | 6 +- .../metadata/ObjectSequenceProtobuf.json | 971 ++++++++++++++++++ .../test_assert_ObjectSequenceProtobuf.ts | 11 + ...est_assertCustom_ObjectSequenceProtobuf.ts | 12 + ...test_assertGuard_ObjectSequenceProtobuf.ts | 11 + ...ssertGuardCustom_ObjectSequenceProtobuf.ts | 15 + ...est_createAssert_ObjectSequenceProtobuf.ts | 11 + ...eateAssertCustom_ObjectSequenceProtobuf.ts | 11 + ...reateAssertGuard_ObjectSequenceProtobuf.ts | 11 + ...ssertGuardCustom_ObjectSequenceProtobuf.ts | 14 + .../test_createIs_ObjectSequenceProtobuf.ts | 10 + ...est_createRandom_ObjectSequenceProtobuf.ts | 13 + ...t_createValidate_ObjectSequenceProtobuf.ts | 10 + ...l_assertFunction_ObjectSequenceProtobuf.ts | 12 + ...ertFunctionAsync_ObjectSequenceProtobuf.ts | 13 + ...ctionAsyncCustom_ObjectSequenceProtobuf.ts | 13 + ...rtFunctionCustom_ObjectSequenceProtobuf.ts | 12 + ...assertParameters_ObjectSequenceProtobuf.ts | 12 + ...tParametersAsync_ObjectSequenceProtobuf.ts | 13 + ...etersAsyncCustom_ObjectSequenceProtobuf.ts | 13 + ...ParametersCustom_ObjectSequenceProtobuf.ts | 12 + ...nal_assertReturn_ObjectSequenceProtobuf.ts | 12 + ...ssertReturnAsync_ObjectSequenceProtobuf.ts | 12 + ...eturnAsyncCustom_ObjectSequenceProtobuf.ts | 13 + ...sertReturnCustom_ObjectSequenceProtobuf.ts | 12 + ...ional_isFunction_ObjectSequenceProtobuf.ts | 10 + ..._isFunctionAsync_ObjectSequenceProtobuf.ts | 11 + ...nal_isParameters_ObjectSequenceProtobuf.ts | 11 + ...sParametersAsync_ObjectSequenceProtobuf.ts | 11 + ...ctional_isReturn_ObjectSequenceProtobuf.ts | 10 + ...al_isReturnAsync_ObjectSequenceProtobuf.ts | 11 + ...validateFunction_ObjectSequenceProtobuf.ts | 11 + ...ateFunctionAsync_ObjectSequenceProtobuf.ts | 11 + ...lidateParameters_ObjectSequenceProtobuf.ts | 11 + ...eParametersAsync_ObjectSequenceProtobuf.ts | 11 + ...l_validateReturn_ObjectSequenceProtobuf.ts | 11 + ...idateReturnAsync_ObjectSequenceProtobuf.ts | 11 + .../is/test_is_ObjectSequenceProtobuf.ts | 10 + ...t_notation_camel_ObjectSequenceProtobuf.ts | 15 + ...tion_createCamel_ObjectSequenceProtobuf.ts | 14 + ...ion_createPascal_ObjectSequenceProtobuf.ts | 14 + ...tion_createSnake_ObjectSequenceProtobuf.ts | 14 + ..._notation_pascal_ObjectSequenceProtobuf.ts | 15 + ...t_notation_snake_ObjectSequenceProtobuf.ts | 15 + ...buf_assertDecode_ObjectSequenceProtobuf.ts | 14 + ...sertDecodeCustom_ObjectSequenceProtobuf.ts | 17 + ...buf_assertEncode_ObjectSequenceProtobuf.ts | 15 + ...sertEncodeCustom_ObjectSequenceProtobuf.ts | 18 + ...eateAssertDecode_ObjectSequenceProtobuf.ts | 13 + ...sertDecodeCustom_ObjectSequenceProtobuf.ts | 15 + ...eateAssertEncode_ObjectSequenceProtobuf.ts | 14 + ...sertEncodeCustom_ObjectSequenceProtobuf.ts | 16 + ...buf_createDecode_ObjectSequenceProtobuf.ts | 12 + ...buf_createEncode_ObjectSequenceProtobuf.ts | 13 + ...f_createIsDecode_ObjectSequenceProtobuf.ts | 12 + ...f_createIsEncode_ObjectSequenceProtobuf.ts | 13 + ...teValidateDecode_ObjectSequenceProtobuf.ts | 12 + ...teValidateEncode_ObjectSequenceProtobuf.ts | 13 + ..._protobuf_decode_ObjectSequenceProtobuf.ts | 12 + ..._protobuf_encode_ObjectSequenceProtobuf.ts | 13 + ...rotobuf_isDecode_ObjectSequenceProtobuf.ts | 12 + ...rotobuf_isEncode_ObjectSequenceProtobuf.ts | 13 + ...protobuf_message_ObjectSequenceProtobuf.ts | 9 + ...f_validateDecode_ObjectSequenceProtobuf.ts | 13 + ...f_validateEncode_ObjectSequenceProtobuf.ts | 14 + .../test_random_ObjectSequenceProtobuf.ts | 14 + ...reflect_metadata_ObjectSequenceProtobuf.ts | 9 + .../test_validate_ObjectSequenceProtobuf.ts | 10 + test/src/structures/ObjectSequenceProtobuf.ts | 82 ++ tsconfig.errors.json | 6 + 76 files changed, 2002 insertions(+), 6 deletions(-) create mode 100644 errors/src/protobuf/error_protobuf_sequence_property_duplicated.ts create mode 100644 errors/src/protobuf/error_protobuf_sequence_union_duplicated.ts create mode 100644 errors/src/protobuf/error_protobuf_sequence_union_omitted.ts create mode 100644 test/schemas/protobuf/ObjectSequenceProtobuf.proto create mode 100644 test/schemas/reflect/metadata/ObjectSequenceProtobuf.json create mode 100644 test/src/features/assert/test_assert_ObjectSequenceProtobuf.ts create mode 100644 test/src/features/assertCustom/test_assertCustom_ObjectSequenceProtobuf.ts create mode 100644 test/src/features/assertGuard/test_assertGuard_ObjectSequenceProtobuf.ts create mode 100644 test/src/features/assertGuardCustom/test_assertGuardCustom_ObjectSequenceProtobuf.ts create mode 100644 test/src/features/createAssert/test_createAssert_ObjectSequenceProtobuf.ts create mode 100644 test/src/features/createAssertCustom/test_createAssertCustom_ObjectSequenceProtobuf.ts create mode 100644 test/src/features/createAssertGuard/test_createAssertGuard_ObjectSequenceProtobuf.ts create mode 100644 test/src/features/createAssertGuardCustom/test_createAssertGuardCustom_ObjectSequenceProtobuf.ts create mode 100644 test/src/features/createIs/test_createIs_ObjectSequenceProtobuf.ts create mode 100644 test/src/features/createRandom/test_createRandom_ObjectSequenceProtobuf.ts create mode 100644 test/src/features/createValidate/test_createValidate_ObjectSequenceProtobuf.ts create mode 100644 test/src/features/functional.assertFunction/test_functional_assertFunction_ObjectSequenceProtobuf.ts create mode 100644 test/src/features/functional.assertFunctionAsync/test_functional_assertFunctionAsync_ObjectSequenceProtobuf.ts create mode 100644 test/src/features/functional.assertFunctionAsyncCustom/test_functional_assertFunctionAsyncCustom_ObjectSequenceProtobuf.ts create mode 100644 test/src/features/functional.assertFunctionCustom/test_functional_assertFunctionCustom_ObjectSequenceProtobuf.ts create mode 100644 test/src/features/functional.assertParameters/test_functional_assertParameters_ObjectSequenceProtobuf.ts create mode 100644 test/src/features/functional.assertParametersAsync/test_functional_assertParametersAsync_ObjectSequenceProtobuf.ts create mode 100644 test/src/features/functional.assertParametersAsyncCustom/test_functional_assertParametersAsyncCustom_ObjectSequenceProtobuf.ts create mode 100644 test/src/features/functional.assertParametersCustom/test_functional_assertParametersCustom_ObjectSequenceProtobuf.ts create mode 100644 test/src/features/functional.assertReturn/test_functional_assertReturn_ObjectSequenceProtobuf.ts create mode 100644 test/src/features/functional.assertReturnAsync/test_functional_assertReturnAsync_ObjectSequenceProtobuf.ts create mode 100644 test/src/features/functional.assertReturnAsyncCustom/test_functional_assertReturnAsyncCustom_ObjectSequenceProtobuf.ts create mode 100644 test/src/features/functional.assertReturnCustom/test_functional_assertReturnCustom_ObjectSequenceProtobuf.ts create mode 100644 test/src/features/functional.isFunction/test_functional_isFunction_ObjectSequenceProtobuf.ts create mode 100644 test/src/features/functional.isFunctionAsync/test_functional_isFunctionAsync_ObjectSequenceProtobuf.ts create mode 100644 test/src/features/functional.isParameters/test_functional_isParameters_ObjectSequenceProtobuf.ts create mode 100644 test/src/features/functional.isParametersAsync/test_functional_isParametersAsync_ObjectSequenceProtobuf.ts create mode 100644 test/src/features/functional.isReturn/test_functional_isReturn_ObjectSequenceProtobuf.ts create mode 100644 test/src/features/functional.isReturnAsync/test_functional_isReturnAsync_ObjectSequenceProtobuf.ts create mode 100644 test/src/features/functional.validateFunction/test_functional_validateFunction_ObjectSequenceProtobuf.ts create mode 100644 test/src/features/functional.validateFunctionAsync/test_functional_validateFunctionAsync_ObjectSequenceProtobuf.ts create mode 100644 test/src/features/functional.validateParameters/test_functional_validateParameters_ObjectSequenceProtobuf.ts create mode 100644 test/src/features/functional.validateParametersAsync/test_functional_validateParametersAsync_ObjectSequenceProtobuf.ts create mode 100644 test/src/features/functional.validateReturn/test_functional_validateReturn_ObjectSequenceProtobuf.ts create mode 100644 test/src/features/functional.validateReturnAsync/test_functional_validateReturnAsync_ObjectSequenceProtobuf.ts create mode 100644 test/src/features/is/test_is_ObjectSequenceProtobuf.ts create mode 100644 test/src/features/notation.camel/test_notation_camel_ObjectSequenceProtobuf.ts create mode 100644 test/src/features/notation.createCamel/test_notation_createCamel_ObjectSequenceProtobuf.ts create mode 100644 test/src/features/notation.createPascal/test_notation_createPascal_ObjectSequenceProtobuf.ts create mode 100644 test/src/features/notation.createSnake/test_notation_createSnake_ObjectSequenceProtobuf.ts create mode 100644 test/src/features/notation.pascal/test_notation_pascal_ObjectSequenceProtobuf.ts create mode 100644 test/src/features/notation.snake/test_notation_snake_ObjectSequenceProtobuf.ts create mode 100644 test/src/features/protobuf.assertDecode/test_protobuf_assertDecode_ObjectSequenceProtobuf.ts create mode 100644 test/src/features/protobuf.assertDecodeCustom/test_protobuf_assertDecodeCustom_ObjectSequenceProtobuf.ts create mode 100644 test/src/features/protobuf.assertEncode/test_protobuf_assertEncode_ObjectSequenceProtobuf.ts create mode 100644 test/src/features/protobuf.assertEncodeCustom/test_protobuf_assertEncodeCustom_ObjectSequenceProtobuf.ts create mode 100644 test/src/features/protobuf.createAssertDecode/test_protobuf_createAssertDecode_ObjectSequenceProtobuf.ts create mode 100644 test/src/features/protobuf.createAssertDecodeCustom/test_protobuf_createAssertDecodeCustom_ObjectSequenceProtobuf.ts create mode 100644 test/src/features/protobuf.createAssertEncode/test_protobuf_createAssertEncode_ObjectSequenceProtobuf.ts create mode 100644 test/src/features/protobuf.createAssertEncodeCustom/test_protobuf_createAssertEncodeCustom_ObjectSequenceProtobuf.ts create mode 100644 test/src/features/protobuf.createDecode/test_protobuf_createDecode_ObjectSequenceProtobuf.ts create mode 100644 test/src/features/protobuf.createEncode/test_protobuf_createEncode_ObjectSequenceProtobuf.ts create mode 100644 test/src/features/protobuf.createIsDecode/test_protobuf_createIsDecode_ObjectSequenceProtobuf.ts create mode 100644 test/src/features/protobuf.createIsEncode/test_protobuf_createIsEncode_ObjectSequenceProtobuf.ts create mode 100644 test/src/features/protobuf.createValidateDecode/test_protobuf_createValidateDecode_ObjectSequenceProtobuf.ts create mode 100644 test/src/features/protobuf.createValidateEncode/test_protobuf_createValidateEncode_ObjectSequenceProtobuf.ts create mode 100644 test/src/features/protobuf.decode/test_protobuf_decode_ObjectSequenceProtobuf.ts create mode 100644 test/src/features/protobuf.encode/test_protobuf_encode_ObjectSequenceProtobuf.ts create mode 100644 test/src/features/protobuf.isDecode/test_protobuf_isDecode_ObjectSequenceProtobuf.ts create mode 100644 test/src/features/protobuf.isEncode/test_protobuf_isEncode_ObjectSequenceProtobuf.ts create mode 100644 test/src/features/protobuf.message/test_protobuf_message_ObjectSequenceProtobuf.ts create mode 100644 test/src/features/protobuf.validateDecode/test_protobuf_validateDecode_ObjectSequenceProtobuf.ts create mode 100644 test/src/features/protobuf.validateEncode/test_protobuf_validateEncode_ObjectSequenceProtobuf.ts create mode 100644 test/src/features/random/test_random_ObjectSequenceProtobuf.ts create mode 100644 test/src/features/reflect.metadata/test_reflect_metadata_ObjectSequenceProtobuf.ts create mode 100644 test/src/features/validate/test_validate_ObjectSequenceProtobuf.ts create mode 100644 test/src/structures/ObjectSequenceProtobuf.ts create mode 100644 tsconfig.errors.json diff --git a/errors/src/protobuf/error_protobuf_sequence_property_duplicated.ts b/errors/src/protobuf/error_protobuf_sequence_property_duplicated.ts new file mode 100644 index 0000000000..f2638068c2 --- /dev/null +++ b/errors/src/protobuf/error_protobuf_sequence_property_duplicated.ts @@ -0,0 +1,27 @@ +import typia, { tags } from "typia"; + +interface IPointer { + value: T; +} +interface Something { + id: string & tags.Sequence<1>; + age: number & tags.Sequence<1>; +} + +// MESSAGE +typia.protobuf.message(); +typia.protobuf.message>(); +typia.protobuf.message>(); +typia.protobuf.message>>(); + +// DECODE +typia.protobuf.createDecode(); +typia.protobuf.createDecode>(); +typia.protobuf.createDecode>(); +typia.protobuf.createDecode>>(); + +// ENCODE +typia.protobuf.createEncode(); +typia.protobuf.createEncode>(); +typia.protobuf.createEncode>(); +typia.protobuf.createEncode>>(); diff --git a/errors/src/protobuf/error_protobuf_sequence_union_duplicated.ts b/errors/src/protobuf/error_protobuf_sequence_union_duplicated.ts new file mode 100644 index 0000000000..8ee4fb5b23 --- /dev/null +++ b/errors/src/protobuf/error_protobuf_sequence_union_duplicated.ts @@ -0,0 +1,32 @@ +import typia, { tags } from "typia"; + +interface IPointer { + value: T; +} +interface Something { + id: + | (number & tags.Type<"uint32"> & tags.Sequence<1>) + | (number & tags.Type<"double"> & tags.Sequence<2>) + | (string & tags.Sequence<3>); + sex: + | (number & tags.Type<"uint32"> & tags.Sequence<4>) + | (string & tags.Sequence<3>); +} + +// MESSAGE +typia.protobuf.message(); +typia.protobuf.message>(); +typia.protobuf.message>(); +typia.protobuf.message>>(); + +// DECODE +typia.protobuf.createDecode(); +typia.protobuf.createDecode>(); +typia.protobuf.createDecode>(); +typia.protobuf.createDecode>>(); + +// ENCODE +typia.protobuf.createEncode(); +typia.protobuf.createEncode>(); +typia.protobuf.createEncode>(); +typia.protobuf.createEncode>>(); diff --git a/errors/src/protobuf/error_protobuf_sequence_union_omitted.ts b/errors/src/protobuf/error_protobuf_sequence_union_omitted.ts new file mode 100644 index 0000000000..3bfac708ff --- /dev/null +++ b/errors/src/protobuf/error_protobuf_sequence_union_omitted.ts @@ -0,0 +1,29 @@ +import typia, { tags } from "typia"; + +interface IPointer { + value: T; +} +interface Something { + id: + | (number & tags.Type<"uint32"> & tags.Sequence<1>) + | (number & tags.Type<"double"> & tags.Sequence<2>) + | string; +} + +// MESSAGE +typia.protobuf.message(); +typia.protobuf.message>(); +typia.protobuf.message>(); +typia.protobuf.message>>(); + +// DECODE +typia.protobuf.createDecode(); +typia.protobuf.createDecode>(); +typia.protobuf.createDecode>(); +typia.protobuf.createDecode>>(); + +// ENCODE +typia.protobuf.createEncode(); +typia.protobuf.createEncode>(); +typia.protobuf.createEncode>(); +typia.protobuf.createEncode>>(); diff --git a/package.json b/package.json index 6cf810f80e..823304eb63 100644 --- a/package.json +++ b/package.json @@ -20,6 +20,7 @@ "-------------------------------------------------": "", "build": "rimraf lib && tsc && rollup -c", "dev": "tsc --project tsconfig.test.json --watch", + "dev:errors": "tsc --project tsconfig.errors.json --watch", "eslint": "eslint ./**/*.ts", "eslint:fix": "eslint ./**/*.ts --fix", "prettier": "prettier src --write", diff --git a/test/schemas/protobuf/ObjectSequenceProtobuf.proto b/test/schemas/protobuf/ObjectSequenceProtobuf.proto new file mode 100644 index 0000000000..85b22a94d9 --- /dev/null +++ b/test/schemas/protobuf/ObjectSequenceProtobuf.proto @@ -0,0 +1,27 @@ +syntax = "proto3"; + +message ObjectSequenceProtobuf { + repeated ObjectSequenceProtobuf.IMember value = 1; + message IMember { + oneof id { + bytes v13 = 13; + uint64 v12 = 12; + string v11 = 11; + } + optional string name = 20; + repeated ObjectSequenceProtobuf.IMember children = 30; + map keywords = 40; + oneof thumbnail { + bytes v41 = 41; + string v42 = 42; + } + required string email = 43; + repeated ObjectSequenceProtobuf.IHobby hobbies = 44; + } + + message IHobby { + required string id = 1; + required string name = 2; + required bool valid = 3; + } +} \ No newline at end of file diff --git a/test/schemas/reflect/metadata/ObjectHttpNullable.json b/test/schemas/reflect/metadata/ObjectHttpNullable.json index 0012eeffe5..e130e34592 100644 --- a/test/schemas/reflect/metadata/ObjectHttpNullable.json +++ b/test/schemas/reflect/metadata/ObjectHttpNullable.json @@ -519,15 +519,15 @@ "type": "string", "values": [ { - "value": "three", + "value": "one", "tags": [] }, { - "value": "two", + "value": "three", "tags": [] }, { - "value": "one", + "value": "two", "tags": [] } ] diff --git a/test/schemas/reflect/metadata/ObjectHttpUndefindable.json b/test/schemas/reflect/metadata/ObjectHttpUndefindable.json index c88559726b..d141306464 100644 --- a/test/schemas/reflect/metadata/ObjectHttpUndefindable.json +++ b/test/schemas/reflect/metadata/ObjectHttpUndefindable.json @@ -502,15 +502,15 @@ "type": "string", "values": [ { - "value": "three", + "value": "one", "tags": [] }, { - "value": "two", + "value": "three", "tags": [] }, { - "value": "one", + "value": "two", "tags": [] } ] diff --git a/test/schemas/reflect/metadata/ObjectSequenceProtobuf.json b/test/schemas/reflect/metadata/ObjectSequenceProtobuf.json new file mode 100644 index 0000000000..571679b167 --- /dev/null +++ b/test/schemas/reflect/metadata/ObjectSequenceProtobuf.json @@ -0,0 +1,971 @@ +{ + "metadatas": [ + { + "any": false, + "required": true, + "optional": false, + "nullable": false, + "functions": [], + "atomics": [], + "constants": [], + "templates": [], + "escaped": null, + "rest": null, + "arrays": [], + "tuples": [], + "objects": [ + { + "name": "ObjectSequenceProtobuf", + "tags": [] + } + ], + "aliases": [], + "natives": [], + "sets": [], + "maps": [] + } + ], + "components": { + "objects": [ + { + "name": "ObjectSequenceProtobuf", + "properties": [ + { + "key": { + "any": false, + "required": true, + "optional": false, + "nullable": false, + "functions": [], + "atomics": [], + "constants": [ + { + "type": "string", + "values": [ + { + "value": "value", + "tags": [] + } + ] + } + ], + "templates": [], + "escaped": null, + "rest": null, + "arrays": [], + "tuples": [], + "objects": [], + "aliases": [], + "natives": [], + "sets": [], + "maps": [] + }, + "value": { + "any": false, + "required": true, + "optional": false, + "nullable": false, + "functions": [], + "atomics": [], + "constants": [], + "templates": [], + "escaped": null, + "rest": null, + "arrays": [ + { + "name": "Array", + "tags": [] + } + ], + "tuples": [], + "objects": [], + "aliases": [], + "natives": [], + "sets": [], + "maps": [] + }, + "description": "Reference of the value.", + "jsDocTags": [] + } + ], + "description": "Pointer referencing value.", + "jsDocTags": [], + "index": 0, + "recursive": false, + "nullables": [ + false + ] + }, + { + "name": "ObjectSequenceProtobuf.IMember", + "properties": [ + { + "key": { + "any": false, + "required": true, + "optional": false, + "nullable": false, + "functions": [], + "atomics": [], + "constants": [ + { + "type": "string", + "values": [ + { + "value": "id", + "tags": [] + } + ] + } + ], + "templates": [], + "escaped": null, + "rest": null, + "arrays": [], + "tuples": [], + "objects": [], + "aliases": [], + "natives": [], + "sets": [], + "maps": [] + }, + "value": { + "any": false, + "required": true, + "optional": false, + "nullable": false, + "functions": [], + "atomics": [ + { + "type": "string", + "tags": [ + [ + { + "target": "string", + "name": "Sequence<11>", + "kind": "sequence", + "value": 11, + "exclusive": false, + "schema": { + "x-protobuf-sequence": 11 + } + } + ] + ] + }, + { + "type": "number", + "tags": [ + [ + { + "target": "number", + "name": "Type<\"uint64\">", + "kind": "type", + "value": "uint64", + "validate": "Math.floor($input) === $input && 0 <= $input && $input <= 18446744073709551615", + "exclusive": true, + "schema": { + "type": "integer" + } + }, + { + "target": "number", + "name": "Sequence<12>", + "kind": "sequence", + "value": 12, + "exclusive": false, + "schema": { + "x-protobuf-sequence": 12 + } + } + ] + ] + } + ], + "constants": [], + "templates": [], + "escaped": null, + "rest": null, + "arrays": [], + "tuples": [], + "objects": [], + "aliases": [], + "natives": [ + { + "name": "Uint8Array", + "tags": [ + [ + { + "target": "object", + "name": "Sequence<13>", + "kind": "sequence", + "value": 13, + "exclusive": false, + "schema": { + "x-protobuf-sequence": 13 + } + } + ] + ] + } + ], + "sets": [], + "maps": [] + }, + "description": null, + "jsDocTags": [] + }, + { + "key": { + "any": false, + "required": true, + "optional": false, + "nullable": false, + "functions": [], + "atomics": [], + "constants": [ + { + "type": "string", + "values": [ + { + "value": "name", + "tags": [] + } + ] + } + ], + "templates": [], + "escaped": null, + "rest": null, + "arrays": [], + "tuples": [], + "objects": [], + "aliases": [], + "natives": [], + "sets": [], + "maps": [] + }, + "value": { + "any": false, + "required": true, + "optional": false, + "nullable": true, + "functions": [], + "atomics": [ + { + "type": "string", + "tags": [ + [ + { + "target": "string", + "name": "Sequence<20>", + "kind": "sequence", + "value": 20, + "exclusive": false, + "schema": { + "x-protobuf-sequence": 20 + } + } + ] + ] + } + ], + "constants": [], + "templates": [], + "escaped": null, + "rest": null, + "arrays": [], + "tuples": [], + "objects": [], + "aliases": [], + "natives": [], + "sets": [], + "maps": [] + }, + "description": null, + "jsDocTags": [] + }, + { + "key": { + "any": false, + "required": true, + "optional": false, + "nullable": false, + "functions": [], + "atomics": [], + "constants": [ + { + "type": "string", + "values": [ + { + "value": "children", + "tags": [] + } + ] + } + ], + "templates": [], + "escaped": null, + "rest": null, + "arrays": [], + "tuples": [], + "objects": [], + "aliases": [], + "natives": [], + "sets": [], + "maps": [] + }, + "value": { + "any": false, + "required": true, + "optional": false, + "nullable": false, + "functions": [], + "atomics": [], + "constants": [], + "templates": [], + "escaped": null, + "rest": null, + "arrays": [ + { + "name": "Array", + "tags": [ + [ + { + "target": "array", + "name": "Sequence<30>", + "kind": "sequence", + "value": 30, + "exclusive": false, + "schema": { + "x-protobuf-sequence": 30 + } + } + ] + ] + } + ], + "tuples": [], + "objects": [], + "aliases": [], + "natives": [], + "sets": [], + "maps": [] + }, + "description": null, + "jsDocTags": [] + }, + { + "key": { + "any": false, + "required": true, + "optional": false, + "nullable": false, + "functions": [], + "atomics": [], + "constants": [ + { + "type": "string", + "values": [ + { + "value": "keywords", + "tags": [] + } + ] + } + ], + "templates": [], + "escaped": null, + "rest": null, + "arrays": [], + "tuples": [], + "objects": [], + "aliases": [], + "natives": [], + "sets": [], + "maps": [] + }, + "value": { + "any": false, + "required": true, + "optional": false, + "nullable": false, + "functions": [], + "atomics": [], + "constants": [], + "templates": [], + "escaped": null, + "rest": null, + "arrays": [], + "tuples": [], + "objects": [], + "aliases": [], + "natives": [], + "sets": [], + "maps": [ + { + "key": { + "any": false, + "required": true, + "optional": false, + "nullable": false, + "functions": [], + "atomics": [ + { + "type": "string", + "tags": [] + } + ], + "constants": [], + "templates": [], + "escaped": null, + "rest": null, + "arrays": [], + "tuples": [], + "objects": [], + "aliases": [], + "natives": [], + "sets": [], + "maps": [] + }, + "value": { + "any": false, + "required": true, + "optional": false, + "nullable": false, + "functions": [], + "atomics": [ + { + "type": "string", + "tags": [] + } + ], + "constants": [], + "templates": [], + "escaped": null, + "rest": null, + "arrays": [], + "tuples": [], + "objects": [], + "aliases": [], + "natives": [], + "sets": [], + "maps": [] + }, + "tags": [ + [ + { + "target": "object", + "name": "Sequence<40>", + "kind": "sequence", + "value": 40, + "exclusive": false, + "schema": { + "x-protobuf-sequence": 40 + } + } + ] + ] + } + ] + }, + "description": null, + "jsDocTags": [] + }, + { + "key": { + "any": false, + "required": true, + "optional": false, + "nullable": false, + "functions": [], + "atomics": [], + "constants": [ + { + "type": "string", + "values": [ + { + "value": "thumbnail", + "tags": [] + } + ] + } + ], + "templates": [], + "escaped": null, + "rest": null, + "arrays": [], + "tuples": [], + "objects": [], + "aliases": [], + "natives": [], + "sets": [], + "maps": [] + }, + "value": { + "any": false, + "required": true, + "optional": false, + "nullable": false, + "functions": [], + "atomics": [ + { + "type": "string", + "tags": [ + [ + { + "target": "string", + "name": "Format<\"uri\">", + "kind": "format", + "value": "uri", + "validate": "/\\/|:/.test($input) && /^(?:[a-z][a-z0-9+\\-.]*:)(?:\\/?\\/(?:(?:[a-z0-9\\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\\d|[01]?\\d\\d?)\\.){3}(?:25[0-5]|2[0-4]\\d|[01]?\\d\\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\\.[a-z0-9\\-._~!$&'()*+,;=:]+)\\]|(?:(?:25[0-5]|2[0-4]\\d|[01]?\\d\\d?)\\.){3}(?:25[0-5]|2[0-4]\\d|[01]?\\d\\d?)|(?:[a-z0-9\\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\\d*)?(?:\\/(?:[a-z0-9\\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\\/(?:(?:[a-z0-9\\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\\/(?:[a-z0-9\\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\\/(?:[a-z0-9\\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\\?(?:[a-z0-9\\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i.test($input)", + "exclusive": [ + "format", + "pattern" + ], + "schema": { + "format": "uri" + } + }, + { + "target": "string", + "name": "ContentMediaType<\"image/*\">", + "kind": "contentMediaType", + "exclusive": false, + "schema": { + "contentMediaType": "image/*" + } + } + ] + ] + } + ], + "constants": [], + "templates": [], + "escaped": null, + "rest": null, + "arrays": [], + "tuples": [], + "objects": [], + "aliases": [], + "natives": [ + { + "name": "Uint8Array", + "tags": [] + } + ], + "sets": [], + "maps": [] + }, + "description": null, + "jsDocTags": [] + }, + { + "key": { + "any": false, + "required": true, + "optional": false, + "nullable": false, + "functions": [], + "atomics": [], + "constants": [ + { + "type": "string", + "values": [ + { + "value": "email", + "tags": [] + } + ] + } + ], + "templates": [], + "escaped": null, + "rest": null, + "arrays": [], + "tuples": [], + "objects": [], + "aliases": [], + "natives": [], + "sets": [], + "maps": [] + }, + "value": { + "any": false, + "required": true, + "optional": false, + "nullable": false, + "functions": [], + "atomics": [ + { + "type": "string", + "tags": [ + [ + { + "target": "string", + "name": "Format<\"email\">", + "kind": "format", + "value": "email", + "validate": "/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i.test($input)", + "exclusive": [ + "format", + "pattern" + ], + "schema": { + "format": "email" + } + } + ] + ] + } + ], + "constants": [], + "templates": [], + "escaped": null, + "rest": null, + "arrays": [], + "tuples": [], + "objects": [], + "aliases": [], + "natives": [], + "sets": [], + "maps": [] + }, + "description": null, + "jsDocTags": [] + }, + { + "key": { + "any": false, + "required": true, + "optional": false, + "nullable": false, + "functions": [], + "atomics": [], + "constants": [ + { + "type": "string", + "values": [ + { + "value": "hobbies", + "tags": [] + } + ] + } + ], + "templates": [], + "escaped": null, + "rest": null, + "arrays": [], + "tuples": [], + "objects": [], + "aliases": [], + "natives": [], + "sets": [], + "maps": [] + }, + "value": { + "any": false, + "required": true, + "optional": false, + "nullable": false, + "functions": [], + "atomics": [], + "constants": [], + "templates": [], + "escaped": null, + "rest": null, + "arrays": [ + { + "name": "Array", + "tags": [] + } + ], + "tuples": [], + "objects": [], + "aliases": [], + "natives": [], + "sets": [], + "maps": [] + }, + "description": null, + "jsDocTags": [] + } + ], + "jsDocTags": [], + "index": 1, + "recursive": true, + "nullables": [ + false + ] + }, + { + "name": "ObjectSequenceProtobuf.IHobby", + "properties": [ + { + "key": { + "any": false, + "required": true, + "optional": false, + "nullable": false, + "functions": [], + "atomics": [], + "constants": [ + { + "type": "string", + "values": [ + { + "value": "id", + "tags": [] + } + ] + } + ], + "templates": [], + "escaped": null, + "rest": null, + "arrays": [], + "tuples": [], + "objects": [], + "aliases": [], + "natives": [], + "sets": [], + "maps": [] + }, + "value": { + "any": false, + "required": true, + "optional": false, + "nullable": false, + "functions": [], + "atomics": [ + { + "type": "string", + "tags": [ + [ + { + "target": "string", + "name": "Format<\"uuid\">", + "kind": "format", + "value": "uuid", + "validate": "/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i.test($input)", + "exclusive": [ + "format", + "pattern" + ], + "schema": { + "format": "uuid" + } + } + ] + ] + } + ], + "constants": [], + "templates": [], + "escaped": null, + "rest": null, + "arrays": [], + "tuples": [], + "objects": [], + "aliases": [], + "natives": [], + "sets": [], + "maps": [] + }, + "description": null, + "jsDocTags": [] + }, + { + "key": { + "any": false, + "required": true, + "optional": false, + "nullable": false, + "functions": [], + "atomics": [], + "constants": [ + { + "type": "string", + "values": [ + { + "value": "name", + "tags": [] + } + ] + } + ], + "templates": [], + "escaped": null, + "rest": null, + "arrays": [], + "tuples": [], + "objects": [], + "aliases": [], + "natives": [], + "sets": [], + "maps": [] + }, + "value": { + "any": false, + "required": true, + "optional": false, + "nullable": false, + "functions": [], + "atomics": [ + { + "type": "string", + "tags": [] + } + ], + "constants": [], + "templates": [], + "escaped": null, + "rest": null, + "arrays": [], + "tuples": [], + "objects": [], + "aliases": [], + "natives": [], + "sets": [], + "maps": [] + }, + "description": null, + "jsDocTags": [] + }, + { + "key": { + "any": false, + "required": true, + "optional": false, + "nullable": false, + "functions": [], + "atomics": [], + "constants": [ + { + "type": "string", + "values": [ + { + "value": "valid", + "tags": [] + } + ] + } + ], + "templates": [], + "escaped": null, + "rest": null, + "arrays": [], + "tuples": [], + "objects": [], + "aliases": [], + "natives": [], + "sets": [], + "maps": [] + }, + "value": { + "any": false, + "required": true, + "optional": false, + "nullable": false, + "functions": [], + "atomics": [ + { + "type": "boolean", + "tags": [] + } + ], + "constants": [], + "templates": [], + "escaped": null, + "rest": null, + "arrays": [], + "tuples": [], + "objects": [], + "aliases": [], + "natives": [], + "sets": [], + "maps": [] + }, + "description": null, + "jsDocTags": [] + } + ], + "jsDocTags": [], + "index": 2, + "recursive": false, + "nullables": [ + false + ] + } + ], + "aliases": [], + "arrays": [ + { + "name": "Array", + "value": { + "any": false, + "required": true, + "optional": false, + "nullable": false, + "functions": [], + "atomics": [], + "constants": [], + "templates": [], + "escaped": null, + "rest": null, + "arrays": [], + "tuples": [], + "objects": [ + { + "name": "ObjectSequenceProtobuf.IMember", + "tags": [] + } + ], + "aliases": [], + "natives": [], + "sets": [], + "maps": [] + }, + "nullables": [ + false + ], + "recursive": false, + "index": null + }, + { + "name": "Array", + "value": { + "any": false, + "required": true, + "optional": false, + "nullable": false, + "functions": [], + "atomics": [], + "constants": [], + "templates": [], + "escaped": null, + "rest": null, + "arrays": [], + "tuples": [], + "objects": [ + { + "name": "ObjectSequenceProtobuf.IHobby", + "tags": [] + } + ], + "aliases": [], + "natives": [], + "sets": [], + "maps": [] + }, + "nullables": [ + false + ], + "recursive": false, + "index": null + } + ], + "tuples": [] + } +} \ No newline at end of file diff --git a/test/src/features/assert/test_assert_ObjectSequenceProtobuf.ts b/test/src/features/assert/test_assert_ObjectSequenceProtobuf.ts new file mode 100644 index 0000000000..695a4f9390 --- /dev/null +++ b/test/src/features/assert/test_assert_ObjectSequenceProtobuf.ts @@ -0,0 +1,11 @@ +import typia from "typia"; +import { TypeGuardError } from "typia"; + +import { _test_assert } from "../../internal/_test_assert"; +import { ObjectSequenceProtobuf } from "../../structures/ObjectSequenceProtobuf"; + +export const test_assert_ObjectSequenceProtobuf = _test_assert(TypeGuardError)( + "ObjectSequenceProtobuf", +)(ObjectSequenceProtobuf)((input) => + typia.assert(input), +); diff --git a/test/src/features/assertCustom/test_assertCustom_ObjectSequenceProtobuf.ts b/test/src/features/assertCustom/test_assertCustom_ObjectSequenceProtobuf.ts new file mode 100644 index 0000000000..794fe24430 --- /dev/null +++ b/test/src/features/assertCustom/test_assertCustom_ObjectSequenceProtobuf.ts @@ -0,0 +1,12 @@ +import typia from "typia"; + +import { CustomGuardError } from "../../internal/CustomGuardError"; +import { _test_assert } from "../../internal/_test_assert"; +import { ObjectSequenceProtobuf } from "../../structures/ObjectSequenceProtobuf"; + +export const test_assertCustom_ObjectSequenceProtobuf = _test_assert( + CustomGuardError, +)("ObjectSequenceProtobuf")(ObjectSequenceProtobuf)( + (input) => + typia.assert(input, (p) => new CustomGuardError(p)), +); diff --git a/test/src/features/assertGuard/test_assertGuard_ObjectSequenceProtobuf.ts b/test/src/features/assertGuard/test_assertGuard_ObjectSequenceProtobuf.ts new file mode 100644 index 0000000000..0ed022f3c8 --- /dev/null +++ b/test/src/features/assertGuard/test_assertGuard_ObjectSequenceProtobuf.ts @@ -0,0 +1,11 @@ +import typia from "typia"; +import { TypeGuardError } from "typia"; + +import { _test_assertGuard } from "../../internal/_test_assertGuard"; +import { ObjectSequenceProtobuf } from "../../structures/ObjectSequenceProtobuf"; + +export const test_assertGuard_ObjectSequenceProtobuf = _test_assertGuard( + TypeGuardError, +)("ObjectSequenceProtobuf")(ObjectSequenceProtobuf)( + (input) => typia.assertGuard(input), +); diff --git a/test/src/features/assertGuardCustom/test_assertGuardCustom_ObjectSequenceProtobuf.ts b/test/src/features/assertGuardCustom/test_assertGuardCustom_ObjectSequenceProtobuf.ts new file mode 100644 index 0000000000..904bd93c5a --- /dev/null +++ b/test/src/features/assertGuardCustom/test_assertGuardCustom_ObjectSequenceProtobuf.ts @@ -0,0 +1,15 @@ +import typia from "typia"; + +import { CustomGuardError } from "../../internal/CustomGuardError"; +import { _test_assertGuard } from "../../internal/_test_assertGuard"; +import { ObjectSequenceProtobuf } from "../../structures/ObjectSequenceProtobuf"; + +export const test_assertGuardCustom_ObjectSequenceProtobuf = _test_assertGuard( + CustomGuardError, +)("ObjectSequenceProtobuf")(ObjectSequenceProtobuf)( + (input) => + typia.assertGuard( + input, + (p) => new CustomGuardError(p), + ), +); diff --git a/test/src/features/createAssert/test_createAssert_ObjectSequenceProtobuf.ts b/test/src/features/createAssert/test_createAssert_ObjectSequenceProtobuf.ts new file mode 100644 index 0000000000..5a8af2d8f2 --- /dev/null +++ b/test/src/features/createAssert/test_createAssert_ObjectSequenceProtobuf.ts @@ -0,0 +1,11 @@ +import typia from "typia"; +import { TypeGuardError } from "typia"; + +import { _test_assert } from "../../internal/_test_assert"; +import { ObjectSequenceProtobuf } from "../../structures/ObjectSequenceProtobuf"; + +export const test_createAssert_ObjectSequenceProtobuf = _test_assert( + TypeGuardError, +)("ObjectSequenceProtobuf")(ObjectSequenceProtobuf)( + typia.createAssert(), +); diff --git a/test/src/features/createAssertCustom/test_createAssertCustom_ObjectSequenceProtobuf.ts b/test/src/features/createAssertCustom/test_createAssertCustom_ObjectSequenceProtobuf.ts new file mode 100644 index 0000000000..4f2fd82fae --- /dev/null +++ b/test/src/features/createAssertCustom/test_createAssertCustom_ObjectSequenceProtobuf.ts @@ -0,0 +1,11 @@ +import typia from "typia"; + +import { CustomGuardError } from "../../internal/CustomGuardError"; +import { _test_assert } from "../../internal/_test_assert"; +import { ObjectSequenceProtobuf } from "../../structures/ObjectSequenceProtobuf"; + +export const test_createAssertCustom_ObjectSequenceProtobuf = _test_assert( + CustomGuardError, +)("ObjectSequenceProtobuf")(ObjectSequenceProtobuf)( + typia.createAssert((p) => new CustomGuardError(p)), +); diff --git a/test/src/features/createAssertGuard/test_createAssertGuard_ObjectSequenceProtobuf.ts b/test/src/features/createAssertGuard/test_createAssertGuard_ObjectSequenceProtobuf.ts new file mode 100644 index 0000000000..7efc981b15 --- /dev/null +++ b/test/src/features/createAssertGuard/test_createAssertGuard_ObjectSequenceProtobuf.ts @@ -0,0 +1,11 @@ +import typia from "typia"; +import { TypeGuardError } from "typia"; + +import { _test_assertGuard } from "../../internal/_test_assertGuard"; +import { ObjectSequenceProtobuf } from "../../structures/ObjectSequenceProtobuf"; + +export const test_createAssertGuard_ObjectSequenceProtobuf = _test_assertGuard( + TypeGuardError, +)("ObjectSequenceProtobuf")(ObjectSequenceProtobuf)( + typia.createAssertGuard(), +); diff --git a/test/src/features/createAssertGuardCustom/test_createAssertGuardCustom_ObjectSequenceProtobuf.ts b/test/src/features/createAssertGuardCustom/test_createAssertGuardCustom_ObjectSequenceProtobuf.ts new file mode 100644 index 0000000000..5e9ecc7e09 --- /dev/null +++ b/test/src/features/createAssertGuardCustom/test_createAssertGuardCustom_ObjectSequenceProtobuf.ts @@ -0,0 +1,14 @@ +import typia from "typia"; + +import { CustomGuardError } from "../../internal/CustomGuardError"; +import { _test_assertGuard } from "../../internal/_test_assertGuard"; +import { ObjectSequenceProtobuf } from "../../structures/ObjectSequenceProtobuf"; + +export const test_createAssertGuardCustom_ObjectSequenceProtobuf = + _test_assertGuard(CustomGuardError)( + "ObjectSequenceProtobuf", + )(ObjectSequenceProtobuf)( + typia.createAssertGuard( + (p) => new CustomGuardError(p), + ), + ); diff --git a/test/src/features/createIs/test_createIs_ObjectSequenceProtobuf.ts b/test/src/features/createIs/test_createIs_ObjectSequenceProtobuf.ts new file mode 100644 index 0000000000..e40a2212c8 --- /dev/null +++ b/test/src/features/createIs/test_createIs_ObjectSequenceProtobuf.ts @@ -0,0 +1,10 @@ +import typia from "typia"; + +import { _test_is } from "../../internal/_test_is"; +import { ObjectSequenceProtobuf } from "../../structures/ObjectSequenceProtobuf"; + +export const test_createIs_ObjectSequenceProtobuf = _test_is( + "ObjectSequenceProtobuf", +)(ObjectSequenceProtobuf)( + typia.createIs(), +); diff --git a/test/src/features/createRandom/test_createRandom_ObjectSequenceProtobuf.ts b/test/src/features/createRandom/test_createRandom_ObjectSequenceProtobuf.ts new file mode 100644 index 0000000000..e53e5a0bf2 --- /dev/null +++ b/test/src/features/createRandom/test_createRandom_ObjectSequenceProtobuf.ts @@ -0,0 +1,13 @@ +import typia from "typia"; + +import { _test_random } from "../../internal/_test_random"; +import { ObjectSequenceProtobuf } from "../../structures/ObjectSequenceProtobuf"; + +export const test_createRandom_ObjectSequenceProtobuf = _test_random( + "ObjectSequenceProtobuf", +)(ObjectSequenceProtobuf)({ + random: typia.createRandom( + (ObjectSequenceProtobuf as any).RANDOM, + ), + assert: typia.createAssert(), +}); diff --git a/test/src/features/createValidate/test_createValidate_ObjectSequenceProtobuf.ts b/test/src/features/createValidate/test_createValidate_ObjectSequenceProtobuf.ts new file mode 100644 index 0000000000..5541f6be80 --- /dev/null +++ b/test/src/features/createValidate/test_createValidate_ObjectSequenceProtobuf.ts @@ -0,0 +1,10 @@ +import typia from "typia"; + +import { _test_validate } from "../../internal/_test_validate"; +import { ObjectSequenceProtobuf } from "../../structures/ObjectSequenceProtobuf"; + +export const test_createValidate_ObjectSequenceProtobuf = _test_validate( + "ObjectSequenceProtobuf", +)(ObjectSequenceProtobuf)( + typia.createValidate(), +); diff --git a/test/src/features/functional.assertFunction/test_functional_assertFunction_ObjectSequenceProtobuf.ts b/test/src/features/functional.assertFunction/test_functional_assertFunction_ObjectSequenceProtobuf.ts new file mode 100644 index 0000000000..b13dfea2e6 --- /dev/null +++ b/test/src/features/functional.assertFunction/test_functional_assertFunction_ObjectSequenceProtobuf.ts @@ -0,0 +1,12 @@ +import typia from "typia"; +import { TypeGuardError } from "typia"; + +import { _test_functional_assertFunction } from "../../internal/_test_functional_assertFunction"; +import { ObjectSequenceProtobuf } from "../../structures/ObjectSequenceProtobuf"; + +export const test_functional_assertFunction_ObjectSequenceProtobuf = + _test_functional_assertFunction(TypeGuardError)("ObjectSequenceProtobuf")( + ObjectSequenceProtobuf, + )((p: (input: ObjectSequenceProtobuf) => ObjectSequenceProtobuf) => + typia.functional.assertFunction(p), + ); diff --git a/test/src/features/functional.assertFunctionAsync/test_functional_assertFunctionAsync_ObjectSequenceProtobuf.ts b/test/src/features/functional.assertFunctionAsync/test_functional_assertFunctionAsync_ObjectSequenceProtobuf.ts new file mode 100644 index 0000000000..d75091cb2d --- /dev/null +++ b/test/src/features/functional.assertFunctionAsync/test_functional_assertFunctionAsync_ObjectSequenceProtobuf.ts @@ -0,0 +1,13 @@ +import typia from "typia"; +import { TypeGuardError } from "typia"; + +import { _test_functional_assertFunctionAsync } from "../../internal/_test_functional_assertFunctionAsync"; +import { ObjectSequenceProtobuf } from "../../structures/ObjectSequenceProtobuf"; + +export const test_functional_assertFunctionAsync_ObjectSequenceProtobuf = + _test_functional_assertFunctionAsync(TypeGuardError)( + "ObjectSequenceProtobuf", + )(ObjectSequenceProtobuf)( + (p: (input: ObjectSequenceProtobuf) => Promise) => + typia.functional.assertFunction(p), + ); diff --git a/test/src/features/functional.assertFunctionAsyncCustom/test_functional_assertFunctionAsyncCustom_ObjectSequenceProtobuf.ts b/test/src/features/functional.assertFunctionAsyncCustom/test_functional_assertFunctionAsyncCustom_ObjectSequenceProtobuf.ts new file mode 100644 index 0000000000..6d3de70849 --- /dev/null +++ b/test/src/features/functional.assertFunctionAsyncCustom/test_functional_assertFunctionAsyncCustom_ObjectSequenceProtobuf.ts @@ -0,0 +1,13 @@ +import typia from "typia"; + +import { CustomGuardError } from "../../internal/CustomGuardError"; +import { _test_functional_assertFunctionAsync } from "../../internal/_test_functional_assertFunctionAsync"; +import { ObjectSequenceProtobuf } from "../../structures/ObjectSequenceProtobuf"; + +export const test_functional_assertFunctionAsyncCustom_ObjectSequenceProtobuf = + _test_functional_assertFunctionAsync(CustomGuardError)( + "ObjectSequenceProtobuf", + )(ObjectSequenceProtobuf)( + (p: (input: ObjectSequenceProtobuf) => Promise) => + typia.functional.assertFunction(p, (p) => new CustomGuardError(p)), + ); diff --git a/test/src/features/functional.assertFunctionCustom/test_functional_assertFunctionCustom_ObjectSequenceProtobuf.ts b/test/src/features/functional.assertFunctionCustom/test_functional_assertFunctionCustom_ObjectSequenceProtobuf.ts new file mode 100644 index 0000000000..c2f2e0e4ec --- /dev/null +++ b/test/src/features/functional.assertFunctionCustom/test_functional_assertFunctionCustom_ObjectSequenceProtobuf.ts @@ -0,0 +1,12 @@ +import typia from "typia"; + +import { CustomGuardError } from "../../internal/CustomGuardError"; +import { _test_functional_assertFunction } from "../../internal/_test_functional_assertFunction"; +import { ObjectSequenceProtobuf } from "../../structures/ObjectSequenceProtobuf"; + +export const test_functional_assertFunctionCustom_ObjectSequenceProtobuf = + _test_functional_assertFunction(CustomGuardError)("ObjectSequenceProtobuf")( + ObjectSequenceProtobuf, + )((p: (input: ObjectSequenceProtobuf) => ObjectSequenceProtobuf) => + typia.functional.assertFunction(p, (p) => new CustomGuardError(p)), + ); diff --git a/test/src/features/functional.assertParameters/test_functional_assertParameters_ObjectSequenceProtobuf.ts b/test/src/features/functional.assertParameters/test_functional_assertParameters_ObjectSequenceProtobuf.ts new file mode 100644 index 0000000000..b16c51be7d --- /dev/null +++ b/test/src/features/functional.assertParameters/test_functional_assertParameters_ObjectSequenceProtobuf.ts @@ -0,0 +1,12 @@ +import typia from "typia"; +import { TypeGuardError } from "typia"; + +import { _test_functional_assertParameters } from "../../internal/_test_functional_assertParameters"; +import { ObjectSequenceProtobuf } from "../../structures/ObjectSequenceProtobuf"; + +export const test_functional_assertParameters_ObjectSequenceProtobuf = + _test_functional_assertParameters(TypeGuardError)("ObjectSequenceProtobuf")( + ObjectSequenceProtobuf, + )((p: (input: ObjectSequenceProtobuf) => ObjectSequenceProtobuf) => + typia.functional.assertParameters(p), + ); diff --git a/test/src/features/functional.assertParametersAsync/test_functional_assertParametersAsync_ObjectSequenceProtobuf.ts b/test/src/features/functional.assertParametersAsync/test_functional_assertParametersAsync_ObjectSequenceProtobuf.ts new file mode 100644 index 0000000000..a11e7824a4 --- /dev/null +++ b/test/src/features/functional.assertParametersAsync/test_functional_assertParametersAsync_ObjectSequenceProtobuf.ts @@ -0,0 +1,13 @@ +import typia from "typia"; +import { TypeGuardError } from "typia"; + +import { _test_functional_assertParametersAsync } from "../../internal/_test_functional_assertParametersAsync"; +import { ObjectSequenceProtobuf } from "../../structures/ObjectSequenceProtobuf"; + +export const test_functional_assertParametersAsync_ObjectSequenceProtobuf = + _test_functional_assertParametersAsync(TypeGuardError)( + "ObjectSequenceProtobuf", + )(ObjectSequenceProtobuf)( + (p: (input: ObjectSequenceProtobuf) => Promise) => + typia.functional.assertParameters(p), + ); diff --git a/test/src/features/functional.assertParametersAsyncCustom/test_functional_assertParametersAsyncCustom_ObjectSequenceProtobuf.ts b/test/src/features/functional.assertParametersAsyncCustom/test_functional_assertParametersAsyncCustom_ObjectSequenceProtobuf.ts new file mode 100644 index 0000000000..f81f70ba49 --- /dev/null +++ b/test/src/features/functional.assertParametersAsyncCustom/test_functional_assertParametersAsyncCustom_ObjectSequenceProtobuf.ts @@ -0,0 +1,13 @@ +import typia from "typia"; + +import { CustomGuardError } from "../../internal/CustomGuardError"; +import { _test_functional_assertParametersAsync } from "../../internal/_test_functional_assertParametersAsync"; +import { ObjectSequenceProtobuf } from "../../structures/ObjectSequenceProtobuf"; + +export const test_functional_assertParametersAsyncCustom_ObjectSequenceProtobuf = + _test_functional_assertParametersAsync(CustomGuardError)( + "ObjectSequenceProtobuf", + )(ObjectSequenceProtobuf)( + (p: (input: ObjectSequenceProtobuf) => Promise) => + typia.functional.assertParameters(p, (p) => new CustomGuardError(p)), + ); diff --git a/test/src/features/functional.assertParametersCustom/test_functional_assertParametersCustom_ObjectSequenceProtobuf.ts b/test/src/features/functional.assertParametersCustom/test_functional_assertParametersCustom_ObjectSequenceProtobuf.ts new file mode 100644 index 0000000000..e3e8e2981e --- /dev/null +++ b/test/src/features/functional.assertParametersCustom/test_functional_assertParametersCustom_ObjectSequenceProtobuf.ts @@ -0,0 +1,12 @@ +import typia from "typia"; + +import { CustomGuardError } from "../../internal/CustomGuardError"; +import { _test_functional_assertParameters } from "../../internal/_test_functional_assertParameters"; +import { ObjectSequenceProtobuf } from "../../structures/ObjectSequenceProtobuf"; + +export const test_functional_assertParametersCustom_ObjectSequenceProtobuf = + _test_functional_assertParameters(CustomGuardError)("ObjectSequenceProtobuf")( + ObjectSequenceProtobuf, + )((p: (input: ObjectSequenceProtobuf) => ObjectSequenceProtobuf) => + typia.functional.assertParameters(p, (p) => new CustomGuardError(p)), + ); diff --git a/test/src/features/functional.assertReturn/test_functional_assertReturn_ObjectSequenceProtobuf.ts b/test/src/features/functional.assertReturn/test_functional_assertReturn_ObjectSequenceProtobuf.ts new file mode 100644 index 0000000000..8579e99a13 --- /dev/null +++ b/test/src/features/functional.assertReturn/test_functional_assertReturn_ObjectSequenceProtobuf.ts @@ -0,0 +1,12 @@ +import typia from "typia"; +import { TypeGuardError } from "typia"; + +import { _test_functional_assertReturn } from "../../internal/_test_functional_assertReturn"; +import { ObjectSequenceProtobuf } from "../../structures/ObjectSequenceProtobuf"; + +export const test_functional_assertReturn_ObjectSequenceProtobuf = + _test_functional_assertReturn(TypeGuardError)("ObjectSequenceProtobuf")( + ObjectSequenceProtobuf, + )((p: (input: ObjectSequenceProtobuf) => ObjectSequenceProtobuf) => + typia.functional.assertReturn(p), + ); diff --git a/test/src/features/functional.assertReturnAsync/test_functional_assertReturnAsync_ObjectSequenceProtobuf.ts b/test/src/features/functional.assertReturnAsync/test_functional_assertReturnAsync_ObjectSequenceProtobuf.ts new file mode 100644 index 0000000000..275a90bc0c --- /dev/null +++ b/test/src/features/functional.assertReturnAsync/test_functional_assertReturnAsync_ObjectSequenceProtobuf.ts @@ -0,0 +1,12 @@ +import typia from "typia"; +import { TypeGuardError } from "typia"; + +import { _test_functional_assertReturnAsync } from "../../internal/_test_functional_assertReturnAsync"; +import { ObjectSequenceProtobuf } from "../../structures/ObjectSequenceProtobuf"; + +export const test_functional_assertReturnAsync_ObjectSequenceProtobuf = + _test_functional_assertReturnAsync(TypeGuardError)("ObjectSequenceProtobuf")( + ObjectSequenceProtobuf, + )((p: (input: ObjectSequenceProtobuf) => Promise) => + typia.functional.assertReturn(p), + ); diff --git a/test/src/features/functional.assertReturnAsyncCustom/test_functional_assertReturnAsyncCustom_ObjectSequenceProtobuf.ts b/test/src/features/functional.assertReturnAsyncCustom/test_functional_assertReturnAsyncCustom_ObjectSequenceProtobuf.ts new file mode 100644 index 0000000000..3dae039ba3 --- /dev/null +++ b/test/src/features/functional.assertReturnAsyncCustom/test_functional_assertReturnAsyncCustom_ObjectSequenceProtobuf.ts @@ -0,0 +1,13 @@ +import typia from "typia"; + +import { CustomGuardError } from "../../internal/CustomGuardError"; +import { _test_functional_assertReturnAsync } from "../../internal/_test_functional_assertReturnAsync"; +import { ObjectSequenceProtobuf } from "../../structures/ObjectSequenceProtobuf"; + +export const test_functional_assertReturnAsyncCustom_ObjectSequenceProtobuf = + _test_functional_assertReturnAsync(CustomGuardError)( + "ObjectSequenceProtobuf", + )(ObjectSequenceProtobuf)( + (p: (input: ObjectSequenceProtobuf) => Promise) => + typia.functional.assertReturn(p, (p) => new CustomGuardError(p)), + ); diff --git a/test/src/features/functional.assertReturnCustom/test_functional_assertReturnCustom_ObjectSequenceProtobuf.ts b/test/src/features/functional.assertReturnCustom/test_functional_assertReturnCustom_ObjectSequenceProtobuf.ts new file mode 100644 index 0000000000..8e09769500 --- /dev/null +++ b/test/src/features/functional.assertReturnCustom/test_functional_assertReturnCustom_ObjectSequenceProtobuf.ts @@ -0,0 +1,12 @@ +import typia from "typia"; + +import { CustomGuardError } from "../../internal/CustomGuardError"; +import { _test_functional_assertReturn } from "../../internal/_test_functional_assertReturn"; +import { ObjectSequenceProtobuf } from "../../structures/ObjectSequenceProtobuf"; + +export const test_functional_assertReturnCustom_ObjectSequenceProtobuf = + _test_functional_assertReturn(CustomGuardError)("ObjectSequenceProtobuf")( + ObjectSequenceProtobuf, + )((p: (input: ObjectSequenceProtobuf) => ObjectSequenceProtobuf) => + typia.functional.assertReturn(p, (p) => new CustomGuardError(p)), + ); diff --git a/test/src/features/functional.isFunction/test_functional_isFunction_ObjectSequenceProtobuf.ts b/test/src/features/functional.isFunction/test_functional_isFunction_ObjectSequenceProtobuf.ts new file mode 100644 index 0000000000..3e37418aef --- /dev/null +++ b/test/src/features/functional.isFunction/test_functional_isFunction_ObjectSequenceProtobuf.ts @@ -0,0 +1,10 @@ +import typia from "typia"; + +import { _test_functional_isFunction } from "../../internal/_test_functional_isFunction"; +import { ObjectSequenceProtobuf } from "../../structures/ObjectSequenceProtobuf"; + +export const test_functional_isFunction_ObjectSequenceProtobuf = + _test_functional_isFunction("ObjectSequenceProtobuf")(ObjectSequenceProtobuf)( + (p: (input: ObjectSequenceProtobuf) => ObjectSequenceProtobuf) => + typia.functional.isFunction(p), + ); diff --git a/test/src/features/functional.isFunctionAsync/test_functional_isFunctionAsync_ObjectSequenceProtobuf.ts b/test/src/features/functional.isFunctionAsync/test_functional_isFunctionAsync_ObjectSequenceProtobuf.ts new file mode 100644 index 0000000000..076311b746 --- /dev/null +++ b/test/src/features/functional.isFunctionAsync/test_functional_isFunctionAsync_ObjectSequenceProtobuf.ts @@ -0,0 +1,11 @@ +import typia from "typia"; + +import { _test_functional_isFunctionAsync } from "../../internal/_test_functional_isFunctionAsync"; +import { ObjectSequenceProtobuf } from "../../structures/ObjectSequenceProtobuf"; + +export const test_functional_isFunctionAsync_ObjectSequenceProtobuf = + _test_functional_isFunctionAsync("ObjectSequenceProtobuf")( + ObjectSequenceProtobuf, + )((p: (input: ObjectSequenceProtobuf) => Promise) => + typia.functional.isFunction(p), + ); diff --git a/test/src/features/functional.isParameters/test_functional_isParameters_ObjectSequenceProtobuf.ts b/test/src/features/functional.isParameters/test_functional_isParameters_ObjectSequenceProtobuf.ts new file mode 100644 index 0000000000..3935428e70 --- /dev/null +++ b/test/src/features/functional.isParameters/test_functional_isParameters_ObjectSequenceProtobuf.ts @@ -0,0 +1,11 @@ +import typia from "typia"; + +import { _test_functional_isParameters } from "../../internal/_test_functional_isParameters"; +import { ObjectSequenceProtobuf } from "../../structures/ObjectSequenceProtobuf"; + +export const test_functional_isParameters_ObjectSequenceProtobuf = + _test_functional_isParameters("ObjectSequenceProtobuf")( + ObjectSequenceProtobuf, + )((p: (input: ObjectSequenceProtobuf) => ObjectSequenceProtobuf) => + typia.functional.isParameters(p), + ); diff --git a/test/src/features/functional.isParametersAsync/test_functional_isParametersAsync_ObjectSequenceProtobuf.ts b/test/src/features/functional.isParametersAsync/test_functional_isParametersAsync_ObjectSequenceProtobuf.ts new file mode 100644 index 0000000000..6716624e93 --- /dev/null +++ b/test/src/features/functional.isParametersAsync/test_functional_isParametersAsync_ObjectSequenceProtobuf.ts @@ -0,0 +1,11 @@ +import typia from "typia"; + +import { _test_functional_isParametersAsync } from "../../internal/_test_functional_isParametersAsync"; +import { ObjectSequenceProtobuf } from "../../structures/ObjectSequenceProtobuf"; + +export const test_functional_isParametersAsync_ObjectSequenceProtobuf = + _test_functional_isParametersAsync("ObjectSequenceProtobuf")( + ObjectSequenceProtobuf, + )((p: (input: ObjectSequenceProtobuf) => Promise) => + typia.functional.isParameters(p), + ); diff --git a/test/src/features/functional.isReturn/test_functional_isReturn_ObjectSequenceProtobuf.ts b/test/src/features/functional.isReturn/test_functional_isReturn_ObjectSequenceProtobuf.ts new file mode 100644 index 0000000000..12743f0db2 --- /dev/null +++ b/test/src/features/functional.isReturn/test_functional_isReturn_ObjectSequenceProtobuf.ts @@ -0,0 +1,10 @@ +import typia from "typia"; + +import { _test_functional_isReturn } from "../../internal/_test_functional_isReturn"; +import { ObjectSequenceProtobuf } from "../../structures/ObjectSequenceProtobuf"; + +export const test_functional_isReturn_ObjectSequenceProtobuf = + _test_functional_isReturn("ObjectSequenceProtobuf")(ObjectSequenceProtobuf)( + (p: (input: ObjectSequenceProtobuf) => ObjectSequenceProtobuf) => + typia.functional.isReturn(p), + ); diff --git a/test/src/features/functional.isReturnAsync/test_functional_isReturnAsync_ObjectSequenceProtobuf.ts b/test/src/features/functional.isReturnAsync/test_functional_isReturnAsync_ObjectSequenceProtobuf.ts new file mode 100644 index 0000000000..9f109e594c --- /dev/null +++ b/test/src/features/functional.isReturnAsync/test_functional_isReturnAsync_ObjectSequenceProtobuf.ts @@ -0,0 +1,11 @@ +import typia from "typia"; + +import { _test_functional_isReturnAsync } from "../../internal/_test_functional_isReturnAsync"; +import { ObjectSequenceProtobuf } from "../../structures/ObjectSequenceProtobuf"; + +export const test_functional_isReturnAsync_ObjectSequenceProtobuf = + _test_functional_isReturnAsync("ObjectSequenceProtobuf")( + ObjectSequenceProtobuf, + )((p: (input: ObjectSequenceProtobuf) => Promise) => + typia.functional.isReturn(p), + ); diff --git a/test/src/features/functional.validateFunction/test_functional_validateFunction_ObjectSequenceProtobuf.ts b/test/src/features/functional.validateFunction/test_functional_validateFunction_ObjectSequenceProtobuf.ts new file mode 100644 index 0000000000..0ee9dbf596 --- /dev/null +++ b/test/src/features/functional.validateFunction/test_functional_validateFunction_ObjectSequenceProtobuf.ts @@ -0,0 +1,11 @@ +import typia from "typia"; + +import { _test_functional_validateFunction } from "../../internal/_test_functional_validateFunction"; +import { ObjectSequenceProtobuf } from "../../structures/ObjectSequenceProtobuf"; + +export const test_functional_validateFunction_ObjectSequenceProtobuf = + _test_functional_validateFunction("ObjectSequenceProtobuf")( + ObjectSequenceProtobuf, + )((p: (input: ObjectSequenceProtobuf) => ObjectSequenceProtobuf) => + typia.functional.validateFunction(p), + ); diff --git a/test/src/features/functional.validateFunctionAsync/test_functional_validateFunctionAsync_ObjectSequenceProtobuf.ts b/test/src/features/functional.validateFunctionAsync/test_functional_validateFunctionAsync_ObjectSequenceProtobuf.ts new file mode 100644 index 0000000000..a9b61e2908 --- /dev/null +++ b/test/src/features/functional.validateFunctionAsync/test_functional_validateFunctionAsync_ObjectSequenceProtobuf.ts @@ -0,0 +1,11 @@ +import typia from "typia"; + +import { _test_functional_validateFunctionAsync } from "../../internal/_test_functional_validateFunctionAsync"; +import { ObjectSequenceProtobuf } from "../../structures/ObjectSequenceProtobuf"; + +export const test_functional_validateFunctionAsync_ObjectSequenceProtobuf = + _test_functional_validateFunctionAsync("ObjectSequenceProtobuf")( + ObjectSequenceProtobuf, + )((p: (input: ObjectSequenceProtobuf) => Promise) => + typia.functional.validateFunction(p), + ); diff --git a/test/src/features/functional.validateParameters/test_functional_validateParameters_ObjectSequenceProtobuf.ts b/test/src/features/functional.validateParameters/test_functional_validateParameters_ObjectSequenceProtobuf.ts new file mode 100644 index 0000000000..8162dc9c20 --- /dev/null +++ b/test/src/features/functional.validateParameters/test_functional_validateParameters_ObjectSequenceProtobuf.ts @@ -0,0 +1,11 @@ +import typia from "typia"; + +import { _test_functional_validateParameters } from "../../internal/_test_functional_validateParameters"; +import { ObjectSequenceProtobuf } from "../../structures/ObjectSequenceProtobuf"; + +export const test_functional_validateParameters_ObjectSequenceProtobuf = + _test_functional_validateParameters("ObjectSequenceProtobuf")( + ObjectSequenceProtobuf, + )((p: (input: ObjectSequenceProtobuf) => ObjectSequenceProtobuf) => + typia.functional.validateParameters(p), + ); diff --git a/test/src/features/functional.validateParametersAsync/test_functional_validateParametersAsync_ObjectSequenceProtobuf.ts b/test/src/features/functional.validateParametersAsync/test_functional_validateParametersAsync_ObjectSequenceProtobuf.ts new file mode 100644 index 0000000000..e4eab77a15 --- /dev/null +++ b/test/src/features/functional.validateParametersAsync/test_functional_validateParametersAsync_ObjectSequenceProtobuf.ts @@ -0,0 +1,11 @@ +import typia from "typia"; + +import { _test_functional_validateParametersAsync } from "../../internal/_test_functional_validateParametersAsync"; +import { ObjectSequenceProtobuf } from "../../structures/ObjectSequenceProtobuf"; + +export const test_functional_validateParametersAsync_ObjectSequenceProtobuf = + _test_functional_validateParametersAsync("ObjectSequenceProtobuf")( + ObjectSequenceProtobuf, + )((p: (input: ObjectSequenceProtobuf) => Promise) => + typia.functional.validateParameters(p), + ); diff --git a/test/src/features/functional.validateReturn/test_functional_validateReturn_ObjectSequenceProtobuf.ts b/test/src/features/functional.validateReturn/test_functional_validateReturn_ObjectSequenceProtobuf.ts new file mode 100644 index 0000000000..4d5e5c1667 --- /dev/null +++ b/test/src/features/functional.validateReturn/test_functional_validateReturn_ObjectSequenceProtobuf.ts @@ -0,0 +1,11 @@ +import typia from "typia"; + +import { _test_functional_validateReturn } from "../../internal/_test_functional_validateReturn"; +import { ObjectSequenceProtobuf } from "../../structures/ObjectSequenceProtobuf"; + +export const test_functional_validateReturn_ObjectSequenceProtobuf = + _test_functional_validateReturn("ObjectSequenceProtobuf")( + ObjectSequenceProtobuf, + )((p: (input: ObjectSequenceProtobuf) => ObjectSequenceProtobuf) => + typia.functional.validateReturn(p), + ); diff --git a/test/src/features/functional.validateReturnAsync/test_functional_validateReturnAsync_ObjectSequenceProtobuf.ts b/test/src/features/functional.validateReturnAsync/test_functional_validateReturnAsync_ObjectSequenceProtobuf.ts new file mode 100644 index 0000000000..b7f16acfcb --- /dev/null +++ b/test/src/features/functional.validateReturnAsync/test_functional_validateReturnAsync_ObjectSequenceProtobuf.ts @@ -0,0 +1,11 @@ +import typia from "typia"; + +import { _test_functional_validateReturnAsync } from "../../internal/_test_functional_validateReturnAsync"; +import { ObjectSequenceProtobuf } from "../../structures/ObjectSequenceProtobuf"; + +export const test_functional_validateReturnAsync_ObjectSequenceProtobuf = + _test_functional_validateReturnAsync("ObjectSequenceProtobuf")( + ObjectSequenceProtobuf, + )((p: (input: ObjectSequenceProtobuf) => Promise) => + typia.functional.validateReturn(p), + ); diff --git a/test/src/features/is/test_is_ObjectSequenceProtobuf.ts b/test/src/features/is/test_is_ObjectSequenceProtobuf.ts new file mode 100644 index 0000000000..9b1a5b1062 --- /dev/null +++ b/test/src/features/is/test_is_ObjectSequenceProtobuf.ts @@ -0,0 +1,10 @@ +import typia from "typia"; + +import { _test_is } from "../../internal/_test_is"; +import { ObjectSequenceProtobuf } from "../../structures/ObjectSequenceProtobuf"; + +export const test_is_ObjectSequenceProtobuf = _test_is( + "ObjectSequenceProtobuf", +)(ObjectSequenceProtobuf)((input) => + typia.is(input), +); diff --git a/test/src/features/notation.camel/test_notation_camel_ObjectSequenceProtobuf.ts b/test/src/features/notation.camel/test_notation_camel_ObjectSequenceProtobuf.ts new file mode 100644 index 0000000000..7910bac8d1 --- /dev/null +++ b/test/src/features/notation.camel/test_notation_camel_ObjectSequenceProtobuf.ts @@ -0,0 +1,15 @@ +import typia from "typia"; + +import { _test_notation_validateGeneral } from "../../internal/_test_notation_validateGeneral"; +import { ObjectSequenceProtobuf } from "../../structures/ObjectSequenceProtobuf"; + +export const test_notation_validateCamel_ObjectSequenceProtobuf = + _test_notation_validateGeneral( + "ObjectSequenceProtobuf", + )(ObjectSequenceProtobuf)< + typia.CamelCase + >({ + convert: (input) => + typia.notations.validateCamel(input), + assert: typia.createAssert>(), + }); diff --git a/test/src/features/notation.createCamel/test_notation_createCamel_ObjectSequenceProtobuf.ts b/test/src/features/notation.createCamel/test_notation_createCamel_ObjectSequenceProtobuf.ts new file mode 100644 index 0000000000..3af3db9188 --- /dev/null +++ b/test/src/features/notation.createCamel/test_notation_createCamel_ObjectSequenceProtobuf.ts @@ -0,0 +1,14 @@ +import typia from "typia"; + +import { _test_notation_validateGeneral } from "../../internal/_test_notation_validateGeneral"; +import { ObjectSequenceProtobuf } from "../../structures/ObjectSequenceProtobuf"; + +export const test_notation_createValidateCamel_ObjectSequenceProtobuf = + _test_notation_validateGeneral( + "ObjectSequenceProtobuf", + )(ObjectSequenceProtobuf)< + typia.CamelCase + >({ + convert: typia.notations.createValidateCamel(), + assert: typia.createAssert>(), + }); diff --git a/test/src/features/notation.createPascal/test_notation_createPascal_ObjectSequenceProtobuf.ts b/test/src/features/notation.createPascal/test_notation_createPascal_ObjectSequenceProtobuf.ts new file mode 100644 index 0000000000..11b76e4ab0 --- /dev/null +++ b/test/src/features/notation.createPascal/test_notation_createPascal_ObjectSequenceProtobuf.ts @@ -0,0 +1,14 @@ +import typia from "typia"; + +import { _test_notation_validateGeneral } from "../../internal/_test_notation_validateGeneral"; +import { ObjectSequenceProtobuf } from "../../structures/ObjectSequenceProtobuf"; + +export const test_notation_createValidatePascal_ObjectSequenceProtobuf = + _test_notation_validateGeneral( + "ObjectSequenceProtobuf", + )(ObjectSequenceProtobuf)< + typia.PascalCase + >({ + convert: typia.notations.createValidatePascal(), + assert: typia.createAssert>(), + }); diff --git a/test/src/features/notation.createSnake/test_notation_createSnake_ObjectSequenceProtobuf.ts b/test/src/features/notation.createSnake/test_notation_createSnake_ObjectSequenceProtobuf.ts new file mode 100644 index 0000000000..f0728206da --- /dev/null +++ b/test/src/features/notation.createSnake/test_notation_createSnake_ObjectSequenceProtobuf.ts @@ -0,0 +1,14 @@ +import typia from "typia"; + +import { _test_notation_validateGeneral } from "../../internal/_test_notation_validateGeneral"; +import { ObjectSequenceProtobuf } from "../../structures/ObjectSequenceProtobuf"; + +export const test_notation_createValidateSnake_ObjectSequenceProtobuf = + _test_notation_validateGeneral( + "ObjectSequenceProtobuf", + )(ObjectSequenceProtobuf)< + typia.SnakeCase + >({ + convert: typia.notations.createValidateSnake(), + assert: typia.createAssert>(), + }); diff --git a/test/src/features/notation.pascal/test_notation_pascal_ObjectSequenceProtobuf.ts b/test/src/features/notation.pascal/test_notation_pascal_ObjectSequenceProtobuf.ts new file mode 100644 index 0000000000..499c89e9fd --- /dev/null +++ b/test/src/features/notation.pascal/test_notation_pascal_ObjectSequenceProtobuf.ts @@ -0,0 +1,15 @@ +import typia from "typia"; + +import { _test_notation_validateGeneral } from "../../internal/_test_notation_validateGeneral"; +import { ObjectSequenceProtobuf } from "../../structures/ObjectSequenceProtobuf"; + +export const test_notation_validatePascal_ObjectSequenceProtobuf = + _test_notation_validateGeneral( + "ObjectSequenceProtobuf", + )(ObjectSequenceProtobuf)< + typia.PascalCase + >({ + convert: (input) => + typia.notations.validatePascal(input), + assert: typia.createAssert>(), + }); diff --git a/test/src/features/notation.snake/test_notation_snake_ObjectSequenceProtobuf.ts b/test/src/features/notation.snake/test_notation_snake_ObjectSequenceProtobuf.ts new file mode 100644 index 0000000000..f7640a66c4 --- /dev/null +++ b/test/src/features/notation.snake/test_notation_snake_ObjectSequenceProtobuf.ts @@ -0,0 +1,15 @@ +import typia from "typia"; + +import { _test_notation_validateGeneral } from "../../internal/_test_notation_validateGeneral"; +import { ObjectSequenceProtobuf } from "../../structures/ObjectSequenceProtobuf"; + +export const test_notation_validateSnake_ObjectSequenceProtobuf = + _test_notation_validateGeneral( + "ObjectSequenceProtobuf", + )(ObjectSequenceProtobuf)< + typia.SnakeCase + >({ + convert: (input) => + typia.notations.validateSnake(input), + assert: typia.createAssert>(), + }); diff --git a/test/src/features/protobuf.assertDecode/test_protobuf_assertDecode_ObjectSequenceProtobuf.ts b/test/src/features/protobuf.assertDecode/test_protobuf_assertDecode_ObjectSequenceProtobuf.ts new file mode 100644 index 0000000000..6b92bf2a8e --- /dev/null +++ b/test/src/features/protobuf.assertDecode/test_protobuf_assertDecode_ObjectSequenceProtobuf.ts @@ -0,0 +1,14 @@ +import typia from "typia"; +import { TypeGuardError } from "typia"; + +import { _test_protobuf_assertDecode } from "../../internal/_test_protobuf_assertDecode"; +import { ObjectSequenceProtobuf } from "../../structures/ObjectSequenceProtobuf"; + +export const test_protobuf_assertDecode_ObjectSequenceProtobuf = + _test_protobuf_assertDecode(TypeGuardError)( + "ObjectSequenceProtobuf", + )(ObjectSequenceProtobuf)({ + decode: (input) => + typia.protobuf.assertDecode(input), + encode: typia.protobuf.createEncode(), + }); diff --git a/test/src/features/protobuf.assertDecodeCustom/test_protobuf_assertDecodeCustom_ObjectSequenceProtobuf.ts b/test/src/features/protobuf.assertDecodeCustom/test_protobuf_assertDecodeCustom_ObjectSequenceProtobuf.ts new file mode 100644 index 0000000000..e9373264bf --- /dev/null +++ b/test/src/features/protobuf.assertDecodeCustom/test_protobuf_assertDecodeCustom_ObjectSequenceProtobuf.ts @@ -0,0 +1,17 @@ +import typia from "typia"; + +import { CustomGuardError } from "../../internal/CustomGuardError"; +import { _test_protobuf_assertDecode } from "../../internal/_test_protobuf_assertDecode"; +import { ObjectSequenceProtobuf } from "../../structures/ObjectSequenceProtobuf"; + +export const test_protobuf_assertDecodeCustom_ObjectSequenceProtobuf = + _test_protobuf_assertDecode(CustomGuardError)( + "ObjectSequenceProtobuf", + )(ObjectSequenceProtobuf)({ + decode: (input) => + typia.protobuf.assertDecode( + input, + (p) => new CustomGuardError(p), + ), + encode: typia.protobuf.createEncode(), + }); diff --git a/test/src/features/protobuf.assertEncode/test_protobuf_assertEncode_ObjectSequenceProtobuf.ts b/test/src/features/protobuf.assertEncode/test_protobuf_assertEncode_ObjectSequenceProtobuf.ts new file mode 100644 index 0000000000..895bf06802 --- /dev/null +++ b/test/src/features/protobuf.assertEncode/test_protobuf_assertEncode_ObjectSequenceProtobuf.ts @@ -0,0 +1,15 @@ +import typia from "typia"; +import { TypeGuardError } from "typia"; + +import { _test_protobuf_assertEncode } from "../../internal/_test_protobuf_assertEncode"; +import { ObjectSequenceProtobuf } from "../../structures/ObjectSequenceProtobuf"; + +export const test_protobuf_assertEncode_ObjectSequenceProtobuf = + _test_protobuf_assertEncode(TypeGuardError)( + "ObjectSequenceProtobuf", + )(ObjectSequenceProtobuf)({ + encode: (input) => + typia.protobuf.assertEncode(input), + decode: typia.protobuf.createDecode(), + message: typia.protobuf.message(), + }); diff --git a/test/src/features/protobuf.assertEncodeCustom/test_protobuf_assertEncodeCustom_ObjectSequenceProtobuf.ts b/test/src/features/protobuf.assertEncodeCustom/test_protobuf_assertEncodeCustom_ObjectSequenceProtobuf.ts new file mode 100644 index 0000000000..1fdcb9ba72 --- /dev/null +++ b/test/src/features/protobuf.assertEncodeCustom/test_protobuf_assertEncodeCustom_ObjectSequenceProtobuf.ts @@ -0,0 +1,18 @@ +import typia from "typia"; + +import { CustomGuardError } from "../../internal/CustomGuardError"; +import { _test_protobuf_assertEncode } from "../../internal/_test_protobuf_assertEncode"; +import { ObjectSequenceProtobuf } from "../../structures/ObjectSequenceProtobuf"; + +export const test_protobuf_assertEncodeCustom_ObjectSequenceProtobuf = + _test_protobuf_assertEncode(CustomGuardError)( + "ObjectSequenceProtobuf", + )(ObjectSequenceProtobuf)({ + encode: (input) => + typia.protobuf.assertEncode( + input, + (p) => new CustomGuardError(p), + ), + decode: typia.protobuf.createDecode(), + message: typia.protobuf.message(), + }); diff --git a/test/src/features/protobuf.createAssertDecode/test_protobuf_createAssertDecode_ObjectSequenceProtobuf.ts b/test/src/features/protobuf.createAssertDecode/test_protobuf_createAssertDecode_ObjectSequenceProtobuf.ts new file mode 100644 index 0000000000..c13f61a386 --- /dev/null +++ b/test/src/features/protobuf.createAssertDecode/test_protobuf_createAssertDecode_ObjectSequenceProtobuf.ts @@ -0,0 +1,13 @@ +import typia from "typia"; +import { TypeGuardError } from "typia"; + +import { _test_protobuf_assertDecode } from "../../internal/_test_protobuf_assertDecode"; +import { ObjectSequenceProtobuf } from "../../structures/ObjectSequenceProtobuf"; + +export const test_protobuf_createAssertDecode_ObjectSequenceProtobuf = + _test_protobuf_assertDecode(TypeGuardError)( + "ObjectSequenceProtobuf", + )(ObjectSequenceProtobuf)({ + decode: typia.protobuf.createAssertDecode(), + encode: typia.protobuf.createEncode(), + }); diff --git a/test/src/features/protobuf.createAssertDecodeCustom/test_protobuf_createAssertDecodeCustom_ObjectSequenceProtobuf.ts b/test/src/features/protobuf.createAssertDecodeCustom/test_protobuf_createAssertDecodeCustom_ObjectSequenceProtobuf.ts new file mode 100644 index 0000000000..d3a3ac3018 --- /dev/null +++ b/test/src/features/protobuf.createAssertDecodeCustom/test_protobuf_createAssertDecodeCustom_ObjectSequenceProtobuf.ts @@ -0,0 +1,15 @@ +import typia from "typia"; + +import { CustomGuardError } from "../../internal/CustomGuardError"; +import { _test_protobuf_assertDecode } from "../../internal/_test_protobuf_assertDecode"; +import { ObjectSequenceProtobuf } from "../../structures/ObjectSequenceProtobuf"; + +export const test_protobuf_createAssertDecodeCustom_ObjectSequenceProtobuf = + _test_protobuf_assertDecode(CustomGuardError)( + "ObjectSequenceProtobuf", + )(ObjectSequenceProtobuf)({ + decode: typia.protobuf.createAssertDecode( + (p) => new CustomGuardError(p), + ), + encode: typia.protobuf.createEncode(), + }); diff --git a/test/src/features/protobuf.createAssertEncode/test_protobuf_createAssertEncode_ObjectSequenceProtobuf.ts b/test/src/features/protobuf.createAssertEncode/test_protobuf_createAssertEncode_ObjectSequenceProtobuf.ts new file mode 100644 index 0000000000..f3263822de --- /dev/null +++ b/test/src/features/protobuf.createAssertEncode/test_protobuf_createAssertEncode_ObjectSequenceProtobuf.ts @@ -0,0 +1,14 @@ +import typia from "typia"; +import { TypeGuardError } from "typia"; + +import { _test_protobuf_assertEncode } from "../../internal/_test_protobuf_assertEncode"; +import { ObjectSequenceProtobuf } from "../../structures/ObjectSequenceProtobuf"; + +export const test_protobuf_createAssertEncode_ObjectSequenceProtobuf = + _test_protobuf_assertEncode(TypeGuardError)( + "ObjectSequenceProtobuf", + )(ObjectSequenceProtobuf)({ + encode: typia.protobuf.createAssertEncode(), + decode: typia.protobuf.createDecode(), + message: typia.protobuf.message(), + }); diff --git a/test/src/features/protobuf.createAssertEncodeCustom/test_protobuf_createAssertEncodeCustom_ObjectSequenceProtobuf.ts b/test/src/features/protobuf.createAssertEncodeCustom/test_protobuf_createAssertEncodeCustom_ObjectSequenceProtobuf.ts new file mode 100644 index 0000000000..67f73fe9a1 --- /dev/null +++ b/test/src/features/protobuf.createAssertEncodeCustom/test_protobuf_createAssertEncodeCustom_ObjectSequenceProtobuf.ts @@ -0,0 +1,16 @@ +import typia from "typia"; + +import { CustomGuardError } from "../../internal/CustomGuardError"; +import { _test_protobuf_assertEncode } from "../../internal/_test_protobuf_assertEncode"; +import { ObjectSequenceProtobuf } from "../../structures/ObjectSequenceProtobuf"; + +export const test_protobuf_createAssertEncodeCustom_ObjectSequenceProtobuf = + _test_protobuf_assertEncode(CustomGuardError)( + "ObjectSequenceProtobuf", + )(ObjectSequenceProtobuf)({ + encode: typia.protobuf.createAssertEncode( + (p) => new CustomGuardError(p), + ), + decode: typia.protobuf.createDecode(), + message: typia.protobuf.message(), + }); diff --git a/test/src/features/protobuf.createDecode/test_protobuf_createDecode_ObjectSequenceProtobuf.ts b/test/src/features/protobuf.createDecode/test_protobuf_createDecode_ObjectSequenceProtobuf.ts new file mode 100644 index 0000000000..16f9201732 --- /dev/null +++ b/test/src/features/protobuf.createDecode/test_protobuf_createDecode_ObjectSequenceProtobuf.ts @@ -0,0 +1,12 @@ +import typia from "typia"; + +import { _test_protobuf_decode } from "../../internal/_test_protobuf_decode"; +import { ObjectSequenceProtobuf } from "../../structures/ObjectSequenceProtobuf"; + +export const test_protobuf_createDecode_ObjectSequenceProtobuf = + _test_protobuf_decode("ObjectSequenceProtobuf")( + ObjectSequenceProtobuf, + )({ + decode: typia.protobuf.createDecode(), + encode: typia.protobuf.createEncode(), + }); diff --git a/test/src/features/protobuf.createEncode/test_protobuf_createEncode_ObjectSequenceProtobuf.ts b/test/src/features/protobuf.createEncode/test_protobuf_createEncode_ObjectSequenceProtobuf.ts new file mode 100644 index 0000000000..ad23001806 --- /dev/null +++ b/test/src/features/protobuf.createEncode/test_protobuf_createEncode_ObjectSequenceProtobuf.ts @@ -0,0 +1,13 @@ +import typia from "typia"; + +import { _test_protobuf_encode } from "../../internal/_test_protobuf_encode"; +import { ObjectSequenceProtobuf } from "../../structures/ObjectSequenceProtobuf"; + +export const test_protobuf_createEncode_ObjectSequenceProtobuf = + _test_protobuf_encode("ObjectSequenceProtobuf")( + ObjectSequenceProtobuf, + )({ + encode: typia.protobuf.createEncode(), + decode: typia.protobuf.createDecode(), + message: typia.protobuf.message(), + }); diff --git a/test/src/features/protobuf.createIsDecode/test_protobuf_createIsDecode_ObjectSequenceProtobuf.ts b/test/src/features/protobuf.createIsDecode/test_protobuf_createIsDecode_ObjectSequenceProtobuf.ts new file mode 100644 index 0000000000..ce63ab688a --- /dev/null +++ b/test/src/features/protobuf.createIsDecode/test_protobuf_createIsDecode_ObjectSequenceProtobuf.ts @@ -0,0 +1,12 @@ +import typia from "typia"; + +import { _test_protobuf_isDecode } from "../../internal/_test_protobuf_isDecode"; +import { ObjectSequenceProtobuf } from "../../structures/ObjectSequenceProtobuf"; + +export const test_protobuf_createIsDecode_ObjectSequenceProtobuf = + _test_protobuf_isDecode("ObjectSequenceProtobuf")( + ObjectSequenceProtobuf, + )({ + decode: typia.protobuf.createIsDecode(), + encode: typia.protobuf.createEncode(), + }); diff --git a/test/src/features/protobuf.createIsEncode/test_protobuf_createIsEncode_ObjectSequenceProtobuf.ts b/test/src/features/protobuf.createIsEncode/test_protobuf_createIsEncode_ObjectSequenceProtobuf.ts new file mode 100644 index 0000000000..02731d6528 --- /dev/null +++ b/test/src/features/protobuf.createIsEncode/test_protobuf_createIsEncode_ObjectSequenceProtobuf.ts @@ -0,0 +1,13 @@ +import typia from "typia"; + +import { _test_protobuf_isEncode } from "../../internal/_test_protobuf_isEncode"; +import { ObjectSequenceProtobuf } from "../../structures/ObjectSequenceProtobuf"; + +export const test_protobuf_createIsEncode_ObjectSequenceProtobuf = + _test_protobuf_isEncode("ObjectSequenceProtobuf")( + ObjectSequenceProtobuf, + )({ + encode: typia.protobuf.createIsEncode(), + decode: typia.protobuf.createDecode(), + message: typia.protobuf.message(), + }); diff --git a/test/src/features/protobuf.createValidateDecode/test_protobuf_createValidateDecode_ObjectSequenceProtobuf.ts b/test/src/features/protobuf.createValidateDecode/test_protobuf_createValidateDecode_ObjectSequenceProtobuf.ts new file mode 100644 index 0000000000..f08281fbcc --- /dev/null +++ b/test/src/features/protobuf.createValidateDecode/test_protobuf_createValidateDecode_ObjectSequenceProtobuf.ts @@ -0,0 +1,12 @@ +import typia from "typia"; + +import { _test_protobuf_validateDecode } from "../../internal/_test_protobuf_validateDecode"; +import { ObjectSequenceProtobuf } from "../../structures/ObjectSequenceProtobuf"; + +export const test_protobuf_createValidateDecode_ObjectSequenceProtobuf = + _test_protobuf_validateDecode( + "ObjectSequenceProtobuf", + )(ObjectSequenceProtobuf)({ + decode: typia.protobuf.createValidateDecode(), + encode: typia.protobuf.createEncode(), + }); diff --git a/test/src/features/protobuf.createValidateEncode/test_protobuf_createValidateEncode_ObjectSequenceProtobuf.ts b/test/src/features/protobuf.createValidateEncode/test_protobuf_createValidateEncode_ObjectSequenceProtobuf.ts new file mode 100644 index 0000000000..625670ffae --- /dev/null +++ b/test/src/features/protobuf.createValidateEncode/test_protobuf_createValidateEncode_ObjectSequenceProtobuf.ts @@ -0,0 +1,13 @@ +import typia from "typia"; + +import { _test_protobuf_validateEncode } from "../../internal/_test_protobuf_validateEncode"; +import { ObjectSequenceProtobuf } from "../../structures/ObjectSequenceProtobuf"; + +export const test_protobuf_createValidateEncode_ObjectSequenceProtobuf = + _test_protobuf_validateEncode( + "ObjectSequenceProtobuf", + )(ObjectSequenceProtobuf)({ + encode: typia.protobuf.createValidateEncode(), + decode: typia.protobuf.createDecode(), + message: typia.protobuf.message(), + }); diff --git a/test/src/features/protobuf.decode/test_protobuf_decode_ObjectSequenceProtobuf.ts b/test/src/features/protobuf.decode/test_protobuf_decode_ObjectSequenceProtobuf.ts new file mode 100644 index 0000000000..c5694bffc3 --- /dev/null +++ b/test/src/features/protobuf.decode/test_protobuf_decode_ObjectSequenceProtobuf.ts @@ -0,0 +1,12 @@ +import typia from "typia"; + +import { _test_protobuf_decode } from "../../internal/_test_protobuf_decode"; +import { ObjectSequenceProtobuf } from "../../structures/ObjectSequenceProtobuf"; + +export const test_protobuf_decode_ObjectSequenceProtobuf = + _test_protobuf_decode("ObjectSequenceProtobuf")( + ObjectSequenceProtobuf, + )({ + decode: (input) => typia.protobuf.decode(input), + encode: typia.protobuf.createEncode(), + }); diff --git a/test/src/features/protobuf.encode/test_protobuf_encode_ObjectSequenceProtobuf.ts b/test/src/features/protobuf.encode/test_protobuf_encode_ObjectSequenceProtobuf.ts new file mode 100644 index 0000000000..96eea5de9e --- /dev/null +++ b/test/src/features/protobuf.encode/test_protobuf_encode_ObjectSequenceProtobuf.ts @@ -0,0 +1,13 @@ +import typia from "typia"; + +import { _test_protobuf_encode } from "../../internal/_test_protobuf_encode"; +import { ObjectSequenceProtobuf } from "../../structures/ObjectSequenceProtobuf"; + +export const test_protobuf_encode_ObjectSequenceProtobuf = + _test_protobuf_encode("ObjectSequenceProtobuf")( + ObjectSequenceProtobuf, + )({ + encode: (input) => typia.protobuf.encode(input), + decode: typia.protobuf.createDecode(), + message: typia.protobuf.message(), + }); diff --git a/test/src/features/protobuf.isDecode/test_protobuf_isDecode_ObjectSequenceProtobuf.ts b/test/src/features/protobuf.isDecode/test_protobuf_isDecode_ObjectSequenceProtobuf.ts new file mode 100644 index 0000000000..833d002481 --- /dev/null +++ b/test/src/features/protobuf.isDecode/test_protobuf_isDecode_ObjectSequenceProtobuf.ts @@ -0,0 +1,12 @@ +import typia from "typia"; + +import { _test_protobuf_isDecode } from "../../internal/_test_protobuf_isDecode"; +import { ObjectSequenceProtobuf } from "../../structures/ObjectSequenceProtobuf"; + +export const test_protobuf_isDecode_ObjectSequenceProtobuf = + _test_protobuf_isDecode("ObjectSequenceProtobuf")( + ObjectSequenceProtobuf, + )({ + decode: (input) => typia.protobuf.isDecode(input), + encode: typia.protobuf.createEncode(), + }); diff --git a/test/src/features/protobuf.isEncode/test_protobuf_isEncode_ObjectSequenceProtobuf.ts b/test/src/features/protobuf.isEncode/test_protobuf_isEncode_ObjectSequenceProtobuf.ts new file mode 100644 index 0000000000..09244a547f --- /dev/null +++ b/test/src/features/protobuf.isEncode/test_protobuf_isEncode_ObjectSequenceProtobuf.ts @@ -0,0 +1,13 @@ +import typia from "typia"; + +import { _test_protobuf_isEncode } from "../../internal/_test_protobuf_isEncode"; +import { ObjectSequenceProtobuf } from "../../structures/ObjectSequenceProtobuf"; + +export const test_protobuf_isEncode_ObjectSequenceProtobuf = + _test_protobuf_isEncode("ObjectSequenceProtobuf")( + ObjectSequenceProtobuf, + )({ + encode: (input) => typia.protobuf.isEncode(input), + decode: typia.protobuf.createDecode(), + message: typia.protobuf.message(), + }); diff --git a/test/src/features/protobuf.message/test_protobuf_message_ObjectSequenceProtobuf.ts b/test/src/features/protobuf.message/test_protobuf_message_ObjectSequenceProtobuf.ts new file mode 100644 index 0000000000..a7dc620cf2 --- /dev/null +++ b/test/src/features/protobuf.message/test_protobuf_message_ObjectSequenceProtobuf.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_protobuf_message } from "../../internal/_test_protobuf_message"; +import { ObjectSequenceProtobuf } from "../../structures/ObjectSequenceProtobuf"; + +export const test_protobuf_message_ObjectSequenceProtobuf = + _test_protobuf_message("ObjectSequenceProtobuf")( + typia.protobuf.message(), + ); diff --git a/test/src/features/protobuf.validateDecode/test_protobuf_validateDecode_ObjectSequenceProtobuf.ts b/test/src/features/protobuf.validateDecode/test_protobuf_validateDecode_ObjectSequenceProtobuf.ts new file mode 100644 index 0000000000..d57809afa4 --- /dev/null +++ b/test/src/features/protobuf.validateDecode/test_protobuf_validateDecode_ObjectSequenceProtobuf.ts @@ -0,0 +1,13 @@ +import typia from "typia"; + +import { _test_protobuf_validateDecode } from "../../internal/_test_protobuf_validateDecode"; +import { ObjectSequenceProtobuf } from "../../structures/ObjectSequenceProtobuf"; + +export const test_protobuf_validateDecode_ObjectSequenceProtobuf = + _test_protobuf_validateDecode( + "ObjectSequenceProtobuf", + )(ObjectSequenceProtobuf)({ + decode: (input) => + typia.protobuf.validateDecode(input), + encode: typia.protobuf.createEncode(), + }); diff --git a/test/src/features/protobuf.validateEncode/test_protobuf_validateEncode_ObjectSequenceProtobuf.ts b/test/src/features/protobuf.validateEncode/test_protobuf_validateEncode_ObjectSequenceProtobuf.ts new file mode 100644 index 0000000000..f158739e6b --- /dev/null +++ b/test/src/features/protobuf.validateEncode/test_protobuf_validateEncode_ObjectSequenceProtobuf.ts @@ -0,0 +1,14 @@ +import typia from "typia"; + +import { _test_protobuf_validateEncode } from "../../internal/_test_protobuf_validateEncode"; +import { ObjectSequenceProtobuf } from "../../structures/ObjectSequenceProtobuf"; + +export const test_protobuf_validateEncode_ObjectSequenceProtobuf = + _test_protobuf_validateEncode( + "ObjectSequenceProtobuf", + )(ObjectSequenceProtobuf)({ + encode: (input) => + typia.protobuf.validateEncode(input), + decode: typia.protobuf.createDecode(), + message: typia.protobuf.message(), + }); diff --git a/test/src/features/random/test_random_ObjectSequenceProtobuf.ts b/test/src/features/random/test_random_ObjectSequenceProtobuf.ts new file mode 100644 index 0000000000..1988ccae0b --- /dev/null +++ b/test/src/features/random/test_random_ObjectSequenceProtobuf.ts @@ -0,0 +1,14 @@ +import typia from "typia"; + +import { _test_random } from "../../internal/_test_random"; +import { ObjectSequenceProtobuf } from "../../structures/ObjectSequenceProtobuf"; + +export const test_random_ObjectSequenceProtobuf = _test_random( + "ObjectSequenceProtobuf", +)(ObjectSequenceProtobuf)({ + random: () => + typia.random( + (ObjectSequenceProtobuf as any).RANDOM, + ), + assert: typia.createAssert(), +}); diff --git a/test/src/features/reflect.metadata/test_reflect_metadata_ObjectSequenceProtobuf.ts b/test/src/features/reflect.metadata/test_reflect_metadata_ObjectSequenceProtobuf.ts new file mode 100644 index 0000000000..d6f825e7f4 --- /dev/null +++ b/test/src/features/reflect.metadata/test_reflect_metadata_ObjectSequenceProtobuf.ts @@ -0,0 +1,9 @@ +import typia from "typia"; + +import { _test_reflect_metadata } from "../../internal/_test_reflect_metadata"; +import { ObjectSequenceProtobuf } from "../../structures/ObjectSequenceProtobuf"; + +export const test_reflect_metadata_ObjectSequenceProtobuf = + _test_reflect_metadata("ObjectSequenceProtobuf")( + typia.reflect.metadata<[ObjectSequenceProtobuf]>(), + ); diff --git a/test/src/features/validate/test_validate_ObjectSequenceProtobuf.ts b/test/src/features/validate/test_validate_ObjectSequenceProtobuf.ts new file mode 100644 index 0000000000..bc65f82d4d --- /dev/null +++ b/test/src/features/validate/test_validate_ObjectSequenceProtobuf.ts @@ -0,0 +1,10 @@ +import typia from "typia"; + +import { _test_validate } from "../../internal/_test_validate"; +import { ObjectSequenceProtobuf } from "../../structures/ObjectSequenceProtobuf"; + +export const test_validate_ObjectSequenceProtobuf = _test_validate( + "ObjectSequenceProtobuf", +)(ObjectSequenceProtobuf)((input) => + typia.validate(input), +); diff --git a/test/src/structures/ObjectSequenceProtobuf.ts b/test/src/structures/ObjectSequenceProtobuf.ts new file mode 100644 index 0000000000..7d145caeec --- /dev/null +++ b/test/src/structures/ObjectSequenceProtobuf.ts @@ -0,0 +1,82 @@ +import { IPointer, randint } from "tstl"; +import { tags } from "typia"; +import { v4 } from "uuid"; + +import { Spoiler } from "../helpers/Spoiler"; +import { TestRandomGenerator } from "../helpers/TestRandomGenerator"; + +export type ObjectSequenceProtobuf = IPointer; +export namespace ObjectSequenceProtobuf { + export interface IMember { + id: + | (string & tags.Sequence<11>) + | (number & tags.Type<"uint64"> & tags.Sequence<12>) + | (Uint8Array & tags.Sequence<13>); + name: (string & tags.Sequence<20>) | null; + children: Array & tags.Sequence<30>; + keywords: Map & tags.Sequence<40>; + thumbnail: + | (string & tags.Format<"uri"> & tags.ContentMediaType<"image/*">) + | Uint8Array; + email: string & tags.Format<"email">; + hobbies: Array; + } + export interface IHobby { + id: string & tags.Format<"uuid">; + name: string; + valid: boolean; + } + + export const ADDABLE = false; + export const JSONABLE = false; + export const PRIMITIVE = false; + + export function generate(level: number = 0): ObjectSequenceProtobuf { + const members: IMember[] = []; + for (const id of [v4(), randint(0, 1_000_000), new Uint8Array()]) + for (const thumbnail of ["https://typia.io/logo.png", new Uint8Array()]) + members.push({ + id, + name: TestRandomGenerator.string(10), + children: level < 2 ? generate(level + 1).value : [], + keywords: new Map( + new Array(randint(1, 4)) + .fill(null) + .map(() => [ + TestRandomGenerator.string(10), + TestRandomGenerator.string(10), + ]), + ), + thumbnail, + email: TestRandomGenerator.email(), + hobbies: new Array(randint(1, 4)).fill(null).map(() => ({ + id: v4(), + name: TestRandomGenerator.string(10), + valid: TestRandomGenerator.boolean(), + })), + }); + return { + value: members, + }; + } + + export const SPOILERS: Spoiler[] = [ + (input) => { + input.value[0]!.id = 3.141592; + return ["$input.value[0].id"]; + }, + (input) => { + input.value[1]!.name = undefined!; + return ["$input.value[1].name"]; + }, + (input) => { + input.value[2]!.children[3]!.thumbnail = "thumbnail URL"; + return ["$input.value[2].children[3].thumbnail"]; + }, + (input) => { + const map = input.value[0]!.keywords; + map.set("key", 3 as any); + return [`$input.value[0].keywords[${map.size - 1}][1]`]; + }, + ]; +} diff --git a/tsconfig.errors.json b/tsconfig.errors.json new file mode 100644 index 0000000000..836307ebac --- /dev/null +++ b/tsconfig.errors.json @@ -0,0 +1,6 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "outDir": "./errors/node_modules/typia/lib", + }, +} \ No newline at end of file