From b4ea7b70bc00d9aecfcacc1fe2d8e8d8d0c4a857 Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Thu, 15 Oct 2015 11:16:21 -0400 Subject: [PATCH] Use the Diff/Patch constructors in the tests. --- prototype/DoubtTests/SESTests.swift | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/prototype/DoubtTests/SESTests.swift b/prototype/DoubtTests/SESTests.swift index 5c9c08a8f..853881c70 100644 --- a/prototype/DoubtTests/SESTests.swift +++ b/prototype/DoubtTests/SESTests.swift @@ -4,39 +4,39 @@ final class SESTests: XCTestCase { } func testSESOverEmptyAndNonEmptyCollectionsIsInsertions() { - assert(SES([], [ a, b ]), ==, [ insert(a), insert(b) ]) + assert(SES([], [ a, b ]), ==, [ .Insert(a), .Insert(b) ]) } func testSESOverNonEmptyAndEmptyCollectionsIsDeletions() { - assert(SES([ a, b ], []), ==, [ delete(a), delete(b) ]) + assert(SES([ a, b ], []), ==, [ .Delete(a), .Delete(b) ]) } func testSESCanInsertAtHead() { - assert(SES([ a, b, c ], [ d, a, b, c ]), ==, [ insert(d), Diff(a), Diff(b), Diff(c) ]) + assert(SES([ a, b, c ], [ d, a, b, c ]), ==, [ .Insert(d), Diff(a), Diff(b), Diff(c) ]) } func testSESCanDeleteAtHead() { - assert(SES([ d, a, b, c ], [ a, b, c ]), ==, [ delete(d), Diff(a), Diff(b), Diff(c) ]) + assert(SES([ d, a, b, c ], [ a, b, c ]), ==, [ .Delete(d), Diff(a), Diff(b), Diff(c) ]) } func testSESCanInsertInMiddle() { - assert(SES([ a, b, c ], [ a, d, b, c ]), ==, [ Diff(a), insert(d), Diff(b), Diff(c) ]) + assert(SES([ a, b, c ], [ a, d, b, c ]), ==, [ Diff(a), .Insert(d), Diff(b), Diff(c) ]) } func testSESCanDeleteInMiddle() { - assert(SES([ a, d, b, c ], [ a, b, c ]), ==, [ Diff(a), delete(d), Diff(b), Diff(c) ]) + assert(SES([ a, d, b, c ], [ a, b, c ]), ==, [ Diff(a), .Delete(d), Diff(b), Diff(c) ]) } func testInsertsAtEnd() { - assert(SES([ a, b, c ], [ a, b, c, d ]), ==, [ Diff(a), Diff(b), Diff(c), insert(d) ]) + assert(SES([ a, b, c ], [ a, b, c, d ]), ==, [ Diff(a), Diff(b), Diff(c), .Insert(d) ]) } func testDeletesAtEnd() { - assert(SES([ a, b, c, d ], [ a, b, c ]), ==, [ Diff(a), Diff(b), Diff(c), delete(d) ]) + assert(SES([ a, b, c, d ], [ a, b, c ]), ==, [ Diff(a), Diff(b), Diff(c), .Delete(d) ]) } func testSESOfLongerSequences() { - assert(SES([ a, b, c, a, b, b, a ], [ c, b, a, b, a, c ]), ==, [ insert(c), delete(a), Diff(b), delete(c), Diff(a), delete(b), Diff(b), Diff(a), insert(c) ]) + assert(SES([ a, b, c, a, b, b, a ], [ c, b, a, b, a, c ]), ==, [ .Insert(c), .Delete(a), Diff(b), .Delete(c), Diff(a), .Delete(b), Diff(b), Diff(a), .Insert(c) ]) } }