Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 0 additions & 18 deletions LocalPackages/CodeEditSourceEditor/Package.resolved

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions LocalPackages/CodeEditSourceEditor/Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ let package = Package(
url: "https://github.com/ChimeHQ/TextFormation",
from: "0.8.2"
),
.package(url: "https://github.com/pointfreeco/swift-custom-dump", from: "1.0.0")
],
targets: [
// A source editor with useful features for code editing.
Expand All @@ -42,7 +41,6 @@ let package = Package(
dependencies: [
"CodeEditSourceEditor",
"TableProGrammars",
.product(name: "CustomDump", package: "swift-custom-dump")
]
),
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

@testable import CodeEditSourceEditor
@testable import CodeEditTextView
import CustomDump
import XCTest

final class TextViewControllerIndentTests: XCTestCase {
Expand All @@ -26,7 +25,7 @@ final class TextViewControllerIndentTests: XCTestCase {
controller.textView.selectionManager.textSelections = [.init(range: NSRange(location: 0, length: 0))]
controller.handleIndent(inwards: true)

expectNoDifference(controller.text, "This is a test string")
XCTAssertEqual(controller.text, "This is a test string")

// Normally, 4 spaces are used for indentation; however, now we only insert 2 leading spaces.
// The outcome should be the same, though.
Expand All @@ -35,7 +34,7 @@ final class TextViewControllerIndentTests: XCTestCase {
controller.textView.selectionManager.textSelections = [.init(range: NSRange(location: 0, length: 0))]
controller.handleIndent(inwards: true)

expectNoDifference(controller.text, "This is a test string")
XCTAssertEqual(controller.text, "This is a test string")
}

func testHandleIndentWithSpacesOutwards() {
Expand All @@ -46,7 +45,7 @@ final class TextViewControllerIndentTests: XCTestCase {

controller.handleIndent(inwards: false)

expectNoDifference(controller.text, " This is a test string")
XCTAssertEqual(controller.text, " This is a test string")
}

func testHandleIndentWithTabsInwards() {
Expand All @@ -58,7 +57,7 @@ final class TextViewControllerIndentTests: XCTestCase {

controller.handleIndent(inwards: true)

expectNoDifference(controller.text, "This is a test string")
XCTAssertEqual(controller.text, "This is a test string")
}

func testHandleIndentWithTabsOutwards() {
Expand All @@ -72,7 +71,7 @@ final class TextViewControllerIndentTests: XCTestCase {

// Normally, we expect nothing to happen because only one line is selected.
// However, this logic is not handled inside `handleIndent`.
expectNoDifference(controller.text, "\tThis is a test string")
XCTAssertEqual(controller.text, "\tThis is a test string")
}

func testHandleIndentMultiLine() {
Expand All @@ -95,7 +94,7 @@ final class TextViewControllerIndentTests: XCTestCase {

controller.handleIndent()
let expectedString = "\tThis is a test string\n\tWith multiple lines\n\tAnd some indentation"
expectNoDifference(controller.text, expectedString)
XCTAssertEqual(controller.text, expectedString)
}

func testHandleInwardIndentMultiLine() {
Expand All @@ -118,7 +117,7 @@ final class TextViewControllerIndentTests: XCTestCase {

controller.handleIndent(inwards: true)
let expectedString = "This is a test string\nWith multiple lines\nAnd some indentation"
expectNoDifference(controller.text, expectedString)
XCTAssertEqual(controller.text, expectedString)
}

func testMultipleLinesHighlighted() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

@testable import CodeEditSourceEditor
@testable import CodeEditTextView
import CustomDump
import XCTest

final class TextViewControllerMoveLinesTests: XCTestCase {
Expand Down Expand Up @@ -37,7 +36,7 @@ final class TextViewControllerMoveLinesTests: XCTestCase {

controller.moveLinesUp()
let expectedString = "With multiple lines\nThis is a test string\n"
expectNoDifference(controller.text, expectedString)
XCTAssertEqual(controller.text, expectedString)
}

func testHandleMoveLinesDownForSingleLine() {
Expand All @@ -58,7 +57,7 @@ final class TextViewControllerMoveLinesTests: XCTestCase {

controller.moveLinesDown()
let expectedString = "With multiple lines\nThis is a test string\n"
expectNoDifference(controller.text, expectedString)
XCTAssertEqual(controller.text, expectedString)
}

func testHandleMoveLinesUpForMultiLine() {
Expand All @@ -80,7 +79,7 @@ final class TextViewControllerMoveLinesTests: XCTestCase {

controller.moveLinesUp()
let expectedString = "With multiple lines\nAnd additional info\nThis is a test string\n"
expectNoDifference(controller.text, expectedString)
XCTAssertEqual(controller.text, expectedString)
}

func testHandleMoveLinesDownForMultiLine() {
Expand All @@ -102,6 +101,6 @@ final class TextViewControllerMoveLinesTests: XCTestCase {

controller.moveLinesDown()
let expectedString = "And additional info\nThis is a test string\nWith multiple lines\n"
expectNoDifference(controller.text, expectedString)
XCTAssertEqual(controller.text, expectedString)
}
}
Loading