ADD: added new version of protobuf

This commit is contained in:
Henry Winkel
2022-12-20 10:09:28 +01:00
parent 4a79559129
commit 1e2b3dda7b
1513 changed files with 123720 additions and 83381 deletions

View File

@@ -34,10 +34,7 @@
#import "GPBDictionary.h"
#import "GPBTestUtilities.h"
#import "objectivec/Tests/UnittestRuntimeProto2.pbobjc.h"
// Disable clang-format for the macros.
// clang-format off
#import "google/protobuf/UnittestRuntimeProto2.pbobjc.h"
// Pull in the macros (using an external file because expanding all tests
// in a single file makes a file that is failing to work with within Xcode.
@@ -45,6 +42,7 @@
//%PDDM-EXPAND BOOL_TESTS_FOR_POD_VALUE(UInt32, uint32_t, 100U, 101U)
// This block of code is generated, do not edit it directly.
// clang-format off
#pragma mark - Bool -> UInt32
@@ -58,7 +56,8 @@
XCTAssertNotNil(dict);
XCTAssertEqual(dict.count, 0U);
XCTAssertFalse([dict getUInt32:NULL forKey:YES]);
[dict enumerateKeysAndUInt32sUsingBlock:^(__unused BOOL aKey, __unused uint32_t aValue, __unused BOOL *stop) {
[dict enumerateKeysAndUInt32sUsingBlock:^(BOOL aKey, uint32_t aValue, BOOL *stop) {
#pragma unused(aKey, aValue, stop)
XCTFail(@"Shouldn't get here!");
}];
[dict release];
@@ -124,7 +123,8 @@
// Stopping the enumeration.
idx = 0;
[dict enumerateKeysAndUInt32sUsingBlock:^(__unused BOOL aKey, __unused uint32_t aValue, BOOL *stop) {
[dict enumerateKeysAndUInt32sUsingBlock:^(BOOL aKey, uint32_t aValue, BOOL *stop) {
#pragma unused(aKey, aValue)
if (idx == 0) *stop = YES;
XCTAssertNotEqual(idx, 2U);
++idx;
@@ -346,8 +346,10 @@
@end
// clang-format on
//%PDDM-EXPAND BOOL_TESTS_FOR_POD_VALUE(Int32, int32_t, 200, 201)
// This block of code is generated, do not edit it directly.
// clang-format off
#pragma mark - Bool -> Int32
@@ -361,7 +363,8 @@
XCTAssertNotNil(dict);
XCTAssertEqual(dict.count, 0U);
XCTAssertFalse([dict getInt32:NULL forKey:YES]);
[dict enumerateKeysAndInt32sUsingBlock:^(__unused BOOL aKey, __unused int32_t aValue, __unused BOOL *stop) {
[dict enumerateKeysAndInt32sUsingBlock:^(BOOL aKey, int32_t aValue, BOOL *stop) {
#pragma unused(aKey, aValue, stop)
XCTFail(@"Shouldn't get here!");
}];
[dict release];
@@ -427,7 +430,8 @@
// Stopping the enumeration.
idx = 0;
[dict enumerateKeysAndInt32sUsingBlock:^(__unused BOOL aKey, __unused int32_t aValue, BOOL *stop) {
[dict enumerateKeysAndInt32sUsingBlock:^(BOOL aKey, int32_t aValue, BOOL *stop) {
#pragma unused(aKey, aValue)
if (idx == 0) *stop = YES;
XCTAssertNotEqual(idx, 2U);
++idx;
@@ -649,8 +653,10 @@
@end
// clang-format on
//%PDDM-EXPAND BOOL_TESTS_FOR_POD_VALUE(UInt64, uint64_t, 300U, 301U)
// This block of code is generated, do not edit it directly.
// clang-format off
#pragma mark - Bool -> UInt64
@@ -664,7 +670,8 @@
XCTAssertNotNil(dict);
XCTAssertEqual(dict.count, 0U);
XCTAssertFalse([dict getUInt64:NULL forKey:YES]);
[dict enumerateKeysAndUInt64sUsingBlock:^(__unused BOOL aKey, __unused uint64_t aValue, __unused BOOL *stop) {
[dict enumerateKeysAndUInt64sUsingBlock:^(BOOL aKey, uint64_t aValue, BOOL *stop) {
#pragma unused(aKey, aValue, stop)
XCTFail(@"Shouldn't get here!");
}];
[dict release];
@@ -730,7 +737,8 @@
// Stopping the enumeration.
idx = 0;
[dict enumerateKeysAndUInt64sUsingBlock:^(__unused BOOL aKey, __unused uint64_t aValue, BOOL *stop) {
[dict enumerateKeysAndUInt64sUsingBlock:^(BOOL aKey, uint64_t aValue, BOOL *stop) {
#pragma unused(aKey, aValue)
if (idx == 0) *stop = YES;
XCTAssertNotEqual(idx, 2U);
++idx;
@@ -952,8 +960,10 @@
@end
// clang-format on
//%PDDM-EXPAND BOOL_TESTS_FOR_POD_VALUE(Int64, int64_t, 400, 401)
// This block of code is generated, do not edit it directly.
// clang-format off
#pragma mark - Bool -> Int64
@@ -967,7 +977,8 @@
XCTAssertNotNil(dict);
XCTAssertEqual(dict.count, 0U);
XCTAssertFalse([dict getInt64:NULL forKey:YES]);
[dict enumerateKeysAndInt64sUsingBlock:^(__unused BOOL aKey, __unused int64_t aValue, __unused BOOL *stop) {
[dict enumerateKeysAndInt64sUsingBlock:^(BOOL aKey, int64_t aValue, BOOL *stop) {
#pragma unused(aKey, aValue, stop)
XCTFail(@"Shouldn't get here!");
}];
[dict release];
@@ -1033,7 +1044,8 @@
// Stopping the enumeration.
idx = 0;
[dict enumerateKeysAndInt64sUsingBlock:^(__unused BOOL aKey, __unused int64_t aValue, BOOL *stop) {
[dict enumerateKeysAndInt64sUsingBlock:^(BOOL aKey, int64_t aValue, BOOL *stop) {
#pragma unused(aKey, aValue)
if (idx == 0) *stop = YES;
XCTAssertNotEqual(idx, 2U);
++idx;
@@ -1255,8 +1267,10 @@
@end
// clang-format on
//%PDDM-EXPAND BOOL_TESTS_FOR_POD_VALUE(Bool, BOOL, NO, YES)
// This block of code is generated, do not edit it directly.
// clang-format off
#pragma mark - Bool -> Bool
@@ -1270,7 +1284,8 @@
XCTAssertNotNil(dict);
XCTAssertEqual(dict.count, 0U);
XCTAssertFalse([dict getBool:NULL forKey:YES]);
[dict enumerateKeysAndBoolsUsingBlock:^(__unused BOOL aKey, __unused BOOL aValue, __unused BOOL *stop) {
[dict enumerateKeysAndBoolsUsingBlock:^(BOOL aKey, BOOL aValue, BOOL *stop) {
#pragma unused(aKey, aValue, stop)
XCTFail(@"Shouldn't get here!");
}];
[dict release];
@@ -1336,7 +1351,8 @@
// Stopping the enumeration.
idx = 0;
[dict enumerateKeysAndBoolsUsingBlock:^(__unused BOOL aKey, __unused BOOL aValue, BOOL *stop) {
[dict enumerateKeysAndBoolsUsingBlock:^(BOOL aKey, BOOL aValue, BOOL *stop) {
#pragma unused(aKey, aValue)
if (idx == 0) *stop = YES;
XCTAssertNotEqual(idx, 2U);
++idx;
@@ -1558,8 +1574,10 @@
@end
// clang-format on
//%PDDM-EXPAND BOOL_TESTS_FOR_POD_VALUE(Float, float, 500.f, 501.f)
// This block of code is generated, do not edit it directly.
// clang-format off
#pragma mark - Bool -> Float
@@ -1573,7 +1591,8 @@
XCTAssertNotNil(dict);
XCTAssertEqual(dict.count, 0U);
XCTAssertFalse([dict getFloat:NULL forKey:YES]);
[dict enumerateKeysAndFloatsUsingBlock:^(__unused BOOL aKey, __unused float aValue, __unused BOOL *stop) {
[dict enumerateKeysAndFloatsUsingBlock:^(BOOL aKey, float aValue, BOOL *stop) {
#pragma unused(aKey, aValue, stop)
XCTFail(@"Shouldn't get here!");
}];
[dict release];
@@ -1639,7 +1658,8 @@
// Stopping the enumeration.
idx = 0;
[dict enumerateKeysAndFloatsUsingBlock:^(__unused BOOL aKey, __unused float aValue, BOOL *stop) {
[dict enumerateKeysAndFloatsUsingBlock:^(BOOL aKey, float aValue, BOOL *stop) {
#pragma unused(aKey, aValue)
if (idx == 0) *stop = YES;
XCTAssertNotEqual(idx, 2U);
++idx;
@@ -1861,8 +1881,10 @@
@end
// clang-format on
//%PDDM-EXPAND BOOL_TESTS_FOR_POD_VALUE(Double, double, 600., 601.)
// This block of code is generated, do not edit it directly.
// clang-format off
#pragma mark - Bool -> Double
@@ -1876,7 +1898,8 @@
XCTAssertNotNil(dict);
XCTAssertEqual(dict.count, 0U);
XCTAssertFalse([dict getDouble:NULL forKey:YES]);
[dict enumerateKeysAndDoublesUsingBlock:^(__unused BOOL aKey, __unused double aValue, __unused BOOL *stop) {
[dict enumerateKeysAndDoublesUsingBlock:^(BOOL aKey, double aValue, BOOL *stop) {
#pragma unused(aKey, aValue, stop)
XCTFail(@"Shouldn't get here!");
}];
[dict release];
@@ -1942,7 +1965,8 @@
// Stopping the enumeration.
idx = 0;
[dict enumerateKeysAndDoublesUsingBlock:^(__unused BOOL aKey, __unused double aValue, BOOL *stop) {
[dict enumerateKeysAndDoublesUsingBlock:^(BOOL aKey, double aValue, BOOL *stop) {
#pragma unused(aKey, aValue)
if (idx == 0) *stop = YES;
XCTAssertNotEqual(idx, 2U);
++idx;
@@ -2164,8 +2188,10 @@
@end
// clang-format on
//%PDDM-EXPAND TESTS_FOR_BOOL_KEY_OBJECT_VALUE(Object, NSString*, @"abc", @"def")
// This block of code is generated, do not edit it directly.
// clang-format off
#pragma mark - Bool -> Object
@@ -2179,7 +2205,8 @@
XCTAssertNotNil(dict);
XCTAssertEqual(dict.count, 0U);
XCTAssertNil([dict objectForKey:YES]);
[dict enumerateKeysAndObjectsUsingBlock:^(__unused BOOL aKey, __unused NSString* aObject, __unused BOOL *stop) {
[dict enumerateKeysAndObjectsUsingBlock:^(BOOL aKey, NSString* aObject, BOOL *stop) {
#pragma unused(aKey, aObject, stop)
XCTFail(@"Shouldn't get here!");
}];
[dict release];
@@ -2237,7 +2264,8 @@
// Stopping the enumeration.
idx = 0;
[dict enumerateKeysAndObjectsUsingBlock:^(__unused BOOL aKey, __unused NSString* aObject, BOOL *stop) {
[dict enumerateKeysAndObjectsUsingBlock:^(BOOL aKey, NSString* aObject, BOOL *stop) {
#pragma unused(aKey, aObject)
if (idx == 0) *stop = YES;
XCTAssertNotEqual(idx, 2U);
++idx;
@@ -2432,6 +2460,7 @@
@end
// clang-format on
//%PDDM-EXPAND-END (8 expansions)