Skip to content

Commit

Permalink
Compile snapshot tests for iOS only
Browse files Browse the repository at this point in the history
  • Loading branch information
johnxnguyen committed Oct 2, 2019
1 parent 5820994 commit 95b2bf1
Show file tree
Hide file tree
Showing 10 changed files with 39 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Tests/AST/VisitorTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
// Created by John Nguyen on 08.04.19.
//

#if os(iOS)

import XCTest
import SnapshotTesting
@testable import Down
Expand Down Expand Up @@ -210,3 +212,5 @@ private class EmptyStyler: Styler {
func style(link str: NSMutableAttributedString, title: String?, url: String?) {}
func style(image str: NSMutableAttributedString, title: String?, url: String?) {}
}

#endif
3 changes: 3 additions & 0 deletions Tests/Styler/BlockQuoteStyleTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
// Copyright © 2019 Glazed Donut, LLC. All rights reserved.
//

#if os(iOS)

class BlockQuoteStyleTests: StylerTestSuite {

/// # Important
Expand Down Expand Up @@ -206,3 +208,4 @@ class BlockQuoteStyleTests: StylerTestSuite {
}
}

#endif
4 changes: 4 additions & 0 deletions Tests/Styler/CodeBlockStyleTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
// Copyright © 2019 Glazed Donut, LLC. All rights reserved.
//

#if os(iOS)

class CodeBlockStyleTests: StylerTestSuite {

/// # Important
Expand Down Expand Up @@ -51,3 +53,5 @@ class CodeBlockStyleTests: StylerTestSuite {
assertStyle(for: markdown, width: .wide)
}
}

#endif
4 changes: 4 additions & 0 deletions Tests/Styler/DownDebugLayoutManagerTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
// Copyright © 2019 Glazed Donut, LLC. All rights reserved.
//

#if os(iOS)

class DownDebugLayoutManagerTests: StylerTestSuite {

/// # Important
Expand Down Expand Up @@ -40,3 +42,5 @@ class DownDebugLayoutManagerTests: StylerTestSuite {
assertStyle(for: markdown, width: .wide, showLineFragments: true)
}
}

#endif
4 changes: 4 additions & 0 deletions Tests/Styler/HeadingStyleTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
// Copyright © 2019 Glazed Donut, LLC. All rights reserved.
//

#if os(iOS)

class HeadingStyleTests: StylerTestSuite {

/// # Important
Expand Down Expand Up @@ -104,3 +106,5 @@ class HeadingStyleTests: StylerTestSuite {
assertStyle(for: markdown, width: .wide)
}
}

#endif
4 changes: 4 additions & 0 deletions Tests/Styler/InlineStyleTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
// Copyright © 2019 Glazed Donut, LLC. All rights reserved.
//

#if os(iOS)

class InlineStyleTests: StylerTestSuite {

/// # Important
Expand Down Expand Up @@ -92,3 +94,5 @@ class InlineStyleTests: StylerTestSuite {
assertStyle(for: markdown, width: .wide)
}
}

#endif
4 changes: 4 additions & 0 deletions Tests/Styler/LinkStyleTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
// Copyright © 2019 Glazed Donut, LLC. All rights reserved.
//

#if os(iOS)

class LinkStyleTests: StylerTestSuite {

/// # Important
Expand Down Expand Up @@ -34,3 +36,5 @@ class LinkStyleTests: StylerTestSuite {
assertStyle(for: markdown, width: .narrow)
}
}

#endif
4 changes: 4 additions & 0 deletions Tests/Styler/ListItemStyleTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
// Copyright © 2019 Glazed Donut, LLC. All rights reserved.
//

#if os(iOS)

class ListItemStyleTests: StylerTestSuite {

/// # Important
Expand Down Expand Up @@ -263,3 +265,5 @@ class ListItemStyleTests: StylerTestSuite {
assertStyle(for: markdown, width: .narrow)
}
}

#endif
4 changes: 4 additions & 0 deletions Tests/Styler/StylerTestSuite.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
// Copyright © 2019 Glazed Donut, LLC. All rights reserved.
//

#if os(iOS)

import XCTest
import SnapshotTesting
@testable import Down
Expand Down Expand Up @@ -156,3 +158,5 @@ private extension DownStylerConfiguration {
return configuration
}
}

#endif
4 changes: 4 additions & 0 deletions Tests/Styler/ThematicBreakSyleTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
// Copyright © 2019 Glazed Donut, LLC. All rights reserved.
//

#if os(iOS)

class ThematicBreakSyleTests: StylerTestSuite {

/// # Important
Expand Down Expand Up @@ -65,3 +67,5 @@ class ThematicBreakSyleTests: StylerTestSuite {
assertStyle(for: markdown, width: .wide, configuration: configuration)
}
}

#endif

0 comments on commit 95b2bf1

Please sign in to comment.