Commit faf2a0d5 authored by Mike JS. Choi's avatar Mike JS. Choi Committed by Carola Nitz

Tests: Add tests for VLCMedia::CodecNameForFourCC

parent 90d0a7f0
......@@ -179,7 +179,6 @@
8D826AE1203F3CC500536EF7 /* VLCRendererDiscoverer.h in Copy Headers */ = {isa = PBXBuildFile; fileRef = 8D2CE647203DCC48004BB7F6 /* VLCRendererDiscoverer.h */; };
8D826AE2203F3CC500536EF7 /* VLCRendererItem.h in Copy Headers */ = {isa = PBXBuildFile; fileRef = 8D2CE64E203EEA47004BB7F6 /* VLCRendererItem.h */; };
AACBBE4A0F95108600F1A2B1 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AACBBE490F95108600F1A2B1 /* Foundation.framework */; };
CA0301D020ADFD2500452BB8 /* libMobileVLCKit.a in Frameworks */ = {isa = PBXBuildFile; fileRef = D2AAC07E0554694100DB518D /* libMobileVLCKit.a */; };
CAA03D0C20C8DCDB001764DA /* libTVVLCKit.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 7D1329591BA304D900BE647E /* libTVVLCKit.a */; };
CAA03D1720C8DE4D001764DA /* libbz2.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = CAA03D1620C8DE4D001764DA /* libbz2.tbd */; };
CAA03D1920C8DE51001764DA /* libz.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = CAA03D1820C8DE51001764DA /* libz.tbd */; };
......@@ -191,6 +190,17 @@
CAA03D2520C8DE7B001764DA /* CoreMedia.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CAA03D2420C8DE7A001764DA /* CoreMedia.framework */; };
CAA9F00320D254AB00CDBB2C /* VLCTimeTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = CAA9F00120D254A600CDBB2C /* VLCTimeTest.swift */; };
CAA9F00420D254AC00CDBB2C /* VLCTimeTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = CAA9F00120D254A600CDBB2C /* VLCTimeTest.swift */; };
CABF4D4120D8DBA900FCCE29 /* VLCMediaTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = CABF4D4020D8DBA900FCCE29 /* VLCMediaTest.swift */; };
CABF4D4220D8DBA900FCCE29 /* VLCMediaTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = CABF4D4020D8DBA900FCCE29 /* VLCMediaTest.swift */; };
CABF4D4520D8DCDD00FCCE29 /* libMobileVLCKit.a in Frameworks */ = {isa = PBXBuildFile; fileRef = D2AAC07E0554694100DB518D /* libMobileVLCKit.a */; };
CABF4D4620D8DD1B00FCCE29 /* libc++.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 7D797FC31DF41F9100AD93ED /* libc++.tbd */; };
CABF4D4720D8DD2000FCCE29 /* libbz2.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 7D24C2B51EC0A3390047E700 /* libbz2.tbd */; };
CABF4D4820D8DD2900FCCE29 /* libiconv.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 7D797FC51DF41F9500AD93ED /* libiconv.tbd */; };
CABF4D4920D8DD3A00FCCE29 /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7D6C891F1C0CA81F00321894 /* AVFoundation.framework */; };
CABF4D4B20D8DD6500FCCE29 /* CoreFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7D8939011B5009DD008F2B14 /* CoreFoundation.framework */; };
CABF4D4D20D8DD7300FCCE29 /* VideoToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7D8938F71B5009BE008F2B14 /* VideoToolbox.framework */; };
CABF4D4E20D8DD7B00FCCE29 /* CoreMedia.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7D8938F51B5009B4008F2B14 /* CoreMedia.framework */; };
CABF4D4F20D8DD7F00FCCE29 /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7D8938F01B5009A2008F2B14 /* AudioToolbox.framework */; };
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
......@@ -424,6 +434,7 @@
CAA9EFFE20D2549300CDBB2C /* TVVLCKitTests-Bridging-Header.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "TVVLCKitTests-Bridging-Header.h"; sourceTree = "<group>"; };
CAA9EFFF20D2549300CDBB2C /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
CAA9F00120D254A600CDBB2C /* VLCTimeTest.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = VLCTimeTest.swift; sourceTree = "<group>"; };
CABF4D4020D8DBA900FCCE29 /* VLCMediaTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = VLCMediaTest.swift; sourceTree = "<group>"; };
D2AAC07E0554694100DB518D /* libMobileVLCKit.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libMobileVLCKit.a; sourceTree = BUILT_PRODUCTS_DIR; };
/* End PBXFileReference section */
......@@ -494,7 +505,15 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
CA0301D020ADFD2500452BB8 /* libMobileVLCKit.a in Frameworks */,
CABF4D4920D8DD3A00FCCE29 /* AVFoundation.framework in Frameworks */,
CABF4D4B20D8DD6500FCCE29 /* CoreFoundation.framework in Frameworks */,
CABF4D4D20D8DD7300FCCE29 /* VideoToolbox.framework in Frameworks */,
CABF4D4E20D8DD7B00FCCE29 /* CoreMedia.framework in Frameworks */,
CABF4D4F20D8DD7F00FCCE29 /* AudioToolbox.framework in Frameworks */,
CABF4D4820D8DD2900FCCE29 /* libiconv.tbd in Frameworks */,
CABF4D4720D8DD2000FCCE29 /* libbz2.tbd in Frameworks */,
CABF4D4620D8DD1B00FCCE29 /* libc++.tbd in Frameworks */,
CABF4D4520D8DCDD00FCCE29 /* libMobileVLCKit.a in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
......@@ -788,6 +807,7 @@
isa = PBXGroup;
children = (
CAA9F00120D254A600CDBB2C /* VLCTimeTest.swift */,
CABF4D4020D8DBA900FCCE29 /* VLCMediaTest.swift */,
);
path = Sources;
sourceTree = "<group>";
......@@ -868,8 +888,8 @@
buildConfigurationList = 7D89393A1B500D1D008F2B14 /* Build configuration list for PBXNativeTarget "DynamicMobileVLCKit" */;
buildPhases = (
7D8939221B500D1C008F2B14 /* Sources */,
7D8939231B500D1C008F2B14 /* Frameworks */,
7D8939241B500D1C008F2B14 /* Headers */,
7D8939231B500D1C008F2B14 /* Frameworks */,
7DEBDB04203C5722000A7D2F /* CopyFiles */,
);
buildRules = (
......@@ -1148,6 +1168,7 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
CABF4D4120D8DBA900FCCE29 /* VLCMediaTest.swift in Sources */,
CAA9F00320D254AB00CDBB2C /* VLCTimeTest.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
......@@ -1156,6 +1177,7 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
CABF4D4220D8DBA900FCCE29 /* VLCMediaTest.swift in Sources */,
CAA9F00420D254AC00CDBB2C /* VLCTimeTest.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
......
/*****************************************************************************
* VLCMediaTest.swift
*****************************************************************************
* Copyright (C) 2018 Mike JS. Choi
* $Id$
*
* Authors: Mike JS. Choi <mkchoi212 # icloud.com>
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation; either version 2.1 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
import XCTest
class VLCMediaTest: XCTestCase {
func testCodecNameForFourCC() {
let tests: [(input: String, fourcc: UInt32, expected: String)] = [
(VLCMediaTracksInformationTypeAudio, 0x414B4D53, "Smacker audio"),
(VLCMediaTracksInformationTypeVideo, 0x32564933, "3ivx MPEG-4 Video"),
(VLCMediaTracksInformationTypeText, 0x37324353, "SCTE-27 subtitles"),
(VLCMediaTracksInformationTypeUnknown, 0x37324353, "SCTE-27 subtitles"),
("", 0x0, "")
]
for (input, fourcc, expected) in tests {
let actual = VLCMedia.codecName(forFourCC: fourcc, trackType: input)
XCTAssertEqual(expected, actual, input)
}
}
}
......@@ -88,6 +88,7 @@
7DEBDAD9203C561D000A7D2F /* vlc.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = CCEC5B7E114D9BE800D34AAB /* vlc.h */; };
CA23EBC120BDF02700C0D635 /* VLCKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7DC28D7F20194117002D05C4 /* VLCKit.framework */; };
CA23EBCC20BDF07700C0D635 /* VLCTimeTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = CA23EBCB20BDF07700C0D635 /* VLCTimeTest.swift */; };
CABF4D5420D8E31700FCCE29 /* VLCMediaTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = CABF4D5320D8E31700FCCE29 /* VLCMediaTest.swift */; };
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
......@@ -191,6 +192,7 @@
CA23EBC020BDF02700C0D635 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
CA23EBCA20BDF07700C0D635 /* VLCKitTests-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "VLCKitTests-Bridging-Header.h"; sourceTree = "<group>"; };
CA23EBCB20BDF07700C0D635 /* VLCTimeTest.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = VLCTimeTest.swift; sourceTree = "<group>"; };
CABF4D5320D8E31700FCCE29 /* VLCMediaTest.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = VLCMediaTest.swift; sourceTree = "<group>"; };
CCEC5B73114D9BE800D34AAB /* deprecated.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = deprecated.h; path = libvlc/vlc/include/vlc/deprecated.h; sourceTree = SOURCE_ROOT; };
CCEC5B74114D9BE800D34AAB /* libvlc_events.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = libvlc_events.h; path = libvlc/vlc/include/vlc/libvlc_events.h; sourceTree = SOURCE_ROOT; };
CCEC5B75114D9BE800D34AAB /* libvlc_media_discoverer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = libvlc_media_discoverer.h; path = libvlc/vlc/include/vlc/libvlc_media_discoverer.h; sourceTree = SOURCE_ROOT; };
......@@ -452,6 +454,7 @@
CA23EBC720BDF03400C0D635 /* Sources */ = {
isa = PBXGroup;
children = (
CABF4D5320D8E31700FCCE29 /* VLCMediaTest.swift */,
CA23EBCB20BDF07700C0D635 /* VLCTimeTest.swift */,
);
path = Sources;
......@@ -714,6 +717,7 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
CABF4D5420D8E31700FCCE29 /* VLCMediaTest.swift in Sources */,
CA23EBCC20BDF07700C0D635 /* VLCTimeTest.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment