Skip to content

Commit

Permalink
Add metal as valid source extension
Browse files Browse the repository at this point in the history
  • Loading branch information
natanrolnik committed Feb 20, 2020
1 parent fc91242 commit fe1ae3c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ Please, check out guidelines: https://keepachangelog.com/en/1.0.0/

- Add FAQ section by @mollyIV
- Add benchmarking helper tool https://github.com/tuist/tuist/pull/957 by @kwridan.
- Add metal as a valid source extension https://github.com/tuist/tuist/pull/1023 by @natanrolnik

### Fixed

Expand Down
2 changes: 1 addition & 1 deletion Sources/TuistCore/Models/Target.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ public struct Target: Equatable, Hashable {

// MARK: - Static

public static let validSourceExtensions: [String] = ["m", "swift", "mm", "cpp", "c", "d", "intentdefinition", "xcmappingmodel"]
public static let validSourceExtensions: [String] = ["m", "swift", "mm", "cpp", "c", "d", "intentdefinition", "xcmappingmodel", "metal"]
public static let validFolderExtensions: [String] = ["framework", "bundle", "app", "xcassets", "appiconset"]

// MARK: - Attributes
Expand Down
4 changes: 3 additions & 1 deletion Tests/TuistCoreTests/Models/TargetTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import XCTest

final class TargetTests: TuistUnitTestCase {
func test_validSourceExtensions() {
XCTAssertEqual(Target.validSourceExtensions, ["m", "swift", "mm", "cpp", "c", "d", "intentdefinition", "xcmappingmodel"])
XCTAssertEqual(Target.validSourceExtensions, ["m", "swift", "mm", "cpp", "c", "d", "intentdefinition", "xcmappingmodel", "metal"])
}

func test_productName_when_staticLibrary() {
Expand Down Expand Up @@ -56,6 +56,7 @@ final class TargetTests: TuistUnitTestCase {
"sources/d.c",
"sources/e.cpp",
"sources/k.kt",
"sources/n.metal",
])

// When
Expand All @@ -73,6 +74,7 @@ final class TargetTests: TuistUnitTestCase {
"sources/c.mm",
"sources/d.c",
"sources/e.cpp",
"sources/n.metal",
]))
}

Expand Down

0 comments on commit fe1ae3c

Please sign in to comment.