Files
ce_cdm/cdm/test/perf_test_xctest.mm
John "Juce" Bruce 694cf6fb25 Source release 17.1.0
2022-07-07 17:14:31 -07:00

30 lines
774 B
Plaintext

// Copyright 2022 Google LLC. All Rights Reserved. This file and proprietary
// source code may only be used and distributed under the Widevine License
// Agreement.
#include <gtest/gtest.h>
#import <XCTest/XCTest.h>
#include "cdm.h"
#include "device_cert.h"
#include "perf_test.h"
@interface GtestTests : XCTestCase
@end
@implementation GtestTests
- (void)testAll {
testing::GTEST_FLAG(filter) = GTEST_FILTER;
char arg0[] = "tests";
char* argv[] = {arg0, nullptr};
int argc = 1;
testing::InitGoogleTest(&argc, argv);
std::string cert{kDeviceCert, kDeviceCert + kDeviceCertSize};
printf("Size 1: %zu, 2: %zu\n", kDeviceCertSize, cert.size());
XCTAssertEqual(widevine::PerfTestMain(&widevine::Cdm::initialize, &widevine::Cdm::create, cert), 0);
}
@end