testTextDeleteTextInsert :: TestTree
testTextDeleteTextInsert =
  let ti1 = O.TextInsert 0 'x' 0
      td1 = O.TextDelete 0
      ti2 = O.TextInsert 1 'y' 0
      td2 = O.TextDelete 1 in
  testGroup "TextDelete vs TextInsert"
  [ testCase "Delete < Insert" $ do
      assertEqual "a" (Just td1) $ T.transform td1 ti2 T.Left
      assertEqual "b" (Just td1) $ T.transform td1 ti2 T.Right
  , testCase "Delete >= Insert" $ do
      assertEqual "a" (Just $ O.TextDelete 1) $ T.transform td1 ti1 T.Left
      assertEqual "b" (Just $ O.TextDelete 1) $ T.transform td1 ti1 T.Right
      assertEqual "c" (Just $ O.TextDelete 2) $ T.transform td2 ti1 T.Left
      assertEqual "c" (Just $ O.TextDelete 2) $ T.transform td2 ti1 T.Right
  ]
testTextDeleteTextInsert :: TestTree
testTextDeleteTextInsert =
  let ti1 = O.TextInsert 0 'x' 0
      td1 = O.TextDelete 0
      ti2 = O.TextInsert 1 'y' 0
      td2 = O.TextDelete 1 in
  testGroup "TextDelete vs TextInsert"
  [ testCase "Delete < Insert" $ do
      assertEqual "a" (Just td1) $ T.transform td1 ti2 T.Left
      assertEqual "b" (Just td1) $ T.transform td1 ti2 T.Right
  , testCase "Delete >= Insert" $ do
      assertEqual "a" (Just $ O.TextDelete 1) $ T.transform td1 ti1 T.Left
      assertEqual "b" (Just $ O.TextDelete 1) $ T.transform td1 ti1 T.Right
      assertEqual "c" (Just $ O.TextDelete 2) $ T.transform td2 ti1 T.Left
      assertEqual "c" (Just $ O.TextDelete 2) $ T.transform td2 ti1 T.Right
  ]
testTextDeleteTextInsert =
  let ti1 = O.TextInsert 0 'x' 0
      td1 = O.TextDelete 0
      ti2 = O.TextInsert 1 'y' 0
      td2 = O.TextDelete 1 in
  testGroup "TextDelete vs TextInsert"
  [ testCase "Delete < Insert" $ do
      assertEqual "a" (Just td1) $ T.transform td1 ti2 T.Left
      assertEqual "b" (Just td1) $ T.transform td1 ti2 T.Right
  , testCase "Delete >= Insert" $ do
      assertEqual "a" (Just $ O.TextDelete 1) $ T.transform td1 ti1 T.Left
      assertEqual "b" (Just $ O.TextDelete 1) $ T.transform td1 ti1 T.Right
      assertEqual "c" (Just $ O.TextDelete 2) $ T.transform td2 ti1 T.Left
      assertEqual "c" (Just $ O.TextDelete 2) $ T.transform td2 ti1 T.Right
  ]