FIRCLSMockMXCrashDiagnostic.m 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. // Copyright 2021 Google LLC
  2. //
  3. // Licensed under the Apache License, Version 2.0 (the "License");
  4. // you may not use this file except in compliance with the License.
  5. // You may obtain a copy of the License at
  6. //
  7. // http://www.apache.org/licenses/LICENSE-2.0
  8. //
  9. // Unless required by applicable law or agreed to in writing, software
  10. // distributed under the License is distributed on an "AS IS" BASIS,
  11. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. // See the License for the specific language governing permissions and
  13. // limitations under the License.
  14. #import "Crashlytics/UnitTests/Mocks/FIRCLSMockMXCrashDiagnostic.h"
  15. #if CLS_METRICKIT_SUPPORTED
  16. @interface FIRCLSMockMXCrashDiagnostic ()
  17. @property(readwrite, strong, nonnull) FIRCLSMockMXCallStackTree *callStackTree;
  18. @property(readwrite, strong, nonnull) NSString *terminationReason;
  19. @property(readwrite, strong, nonnull) NSString *virtualMemoryRegionInfo;
  20. @property(readwrite, strong, nonnull) NSNumber *exceptionType;
  21. @property(readwrite, strong, nonnull) NSNumber *exceptionCode;
  22. @property(readwrite, strong, nonnull) NSNumber *signal;
  23. @property(readwrite, strong, nonnull) FIRCLSMockMXMetadata *metaData;
  24. @property(readwrite, strong, nonnull) NSString *applicationVersion;
  25. @end
  26. @implementation FIRCLSMockMXCrashDiagnostic
  27. @synthesize callStackTree = _callStackTree;
  28. @synthesize terminationReason = _terminationReason;
  29. @synthesize virtualMemoryRegionInfo = _virtualMemoryRegionInfo;
  30. @synthesize exceptionType = _exceptionType;
  31. @synthesize exceptionCode = _exceptionCode;
  32. @synthesize signal = _signal;
  33. @synthesize metaData = _metaData;
  34. @synthesize applicationVersion = _applicationVersion;
  35. - (instancetype)initWithCallStackTree:(FIRCLSMockMXCallStackTree *)callStackTree
  36. terminationReason:(NSString *)terminationReason
  37. virtualMemoryRegionInfo:(NSString *)virtualMemoryRegionInfo
  38. exceptionType:(NSNumber *)exceptionType
  39. exceptionCode:(NSNumber *)exceptionCode
  40. signal:(NSNumber *)signal
  41. metaData:(FIRCLSMockMXMetadata *)metaData
  42. applicationVersion:(NSString *)applicationVersion {
  43. self = [super init];
  44. _callStackTree = callStackTree;
  45. _terminationReason = terminationReason;
  46. _virtualMemoryRegionInfo = virtualMemoryRegionInfo;
  47. _exceptionCode = exceptionCode;
  48. _exceptionType = exceptionType;
  49. _signal = signal;
  50. _applicationVersion = applicationVersion;
  51. _metaData = metaData;
  52. return self;
  53. }
  54. @end
  55. #endif