1#!/usr/bin/env vpython3 2 3# Copyright (c) 2020 The WebRTC project authors. All Rights Reserved. 4# 5# Use of this source code is governed by a BSD-style license 6# that can be found in the LICENSE file in the root of the source 7# tree. An additional intellectual property rights grant can be found 8# in the file PATENTS. All contributing project authors may 9# be found in the AUTHORS file in the root of the source tree. 10 11import unittest 12from copy_framework_header import _ReplaceDoubleQuote 13 14 15class TestCopyFramework(unittest.TestCase): 16 def testReplaceDoubleQuote(self): 17 self.assertEqual(_ReplaceDoubleQuote("""#import "RTCMacros.h\""""), 18 """#import <WebRTC/RTCMacros.h>""") 19 self.assertEqual(_ReplaceDoubleQuote("""#import "RTCMacros.h\"\n"""), 20 """#import <WebRTC/RTCMacros.h>\n""") 21 self.assertEqual( 22 _ReplaceDoubleQuote("""#import "UIDevice+RTCDevice.h\"\n"""), 23 """#import <WebRTC/UIDevice+RTCDevice.h>\n""") 24 self.assertEqual( 25 _ReplaceDoubleQuote("#import \"components/video_codec/" + 26 "RTCVideoDecoderFactoryH264.h\"\n"), 27 """#import <WebRTC/RTCVideoDecoderFactoryH264.h>\n""") 28 self.assertEqual( 29 _ReplaceDoubleQuote( 30 """@property(atomic, strong) RTC_OBJC_TYPE(RTCVideoFrame) *\n"""), 31 """@property(atomic, strong) RTC_OBJC_TYPE(RTCVideoFrame) *\n""") 32 33 34if __name__ == '__main__': 35 unittest.main() 36