    "
 fun foo() => {
   switch blah {
+  | Pattern => \"dada\"
+  | Pattern2 => {
+      hello()
+    }
+  | _ => \"whatever\"
+  }
+};
+"))
+
+(ert-deftest indent-normal-switch ()
+  (test-indent
+   "
+let hasExactlyTwoCars lst =>
+  switch lst {
+  | NoMore => false                              /* 0 */
+  | List p NoMore => false                       /* 1 */
+  | List p (List p2 NoMore) => true              /* 2 */
+  | List p (List p2 (List p3 theRest)) => false  /* 3+ */
+  };
+"))
+
+;; TODO maybe fix the indentation of y(); below
+(ert-deftest indent-indented-switch ()
+  (test-indent
+   "
+fun foo() => {
+  let x = {
+    switch blah {
     | Pattern => \"dada\"
     | Pattern2 => {
         hello()
       }
     | _ => \"whatever\"
-  }
-};
-"))
-
-;; TODO maybe fix the indentation of y(); below
-(ert-deftest indent-indented-switch ()
-  (test-indent
-   "
-fun foo() => {
-  let x = {
-    switch blah {
-      | Pattern => \"dada\"
-      | Pattern2 => {
-          hello()
-        }
-      | _ => \"whatever\"
     }
   }
     y();

"))

;; TODO fix alignment of curly braces when down a line
(ert-deftest indent-nested-funs ()
  (test-indent
   "
fun nexted_funs(a: fun(b:int,
                       c:char)
                => int,
                d: int)
  => uint
  {
    0
  };
"
   ))

;; TODO fix alignment of curly braces when down a line
(ert-deftest indent-multi-line-expr ()
  (test-indent
   "

;;; reason-mode-tests.el --- ERT tests for reason-mode.el
;; Portions Copyright (c) 2015-present, Facebook, Inc. All rights reserved.

;;; Commentary:

;; Tests for reason-mode.

;;; Code:

(message "Running tests on Emacs %s" emacs-version)

