summary refs log tree commit diff stats
path: root/tests/enum
diff options
context:
space:
mode:
authorAdam Strzelecki <ono@java.pl>2015-09-04 23:04:32 +0200
committerAdam Strzelecki <ono@java.pl>2015-09-04 23:04:32 +0200
commite80465dacf50f260abec30ae57d37b298c93fd83 (patch)
tree393394f8353a4adb49f95e6f13da1fd41681b7b3 /tests/enum
parentac9c1cd6b980d4f00eeb52d1109d8e2c8cd21213 (diff)
downloadNim-e80465dacf50f260abec30ae57d37b298c93fd83.tar.gz
tests: Trim .nim files trailing whitespace
via OSX: find . -name '*.nim' -exec sed -i '' -E 's/[[:space:]]+$//' {} +
Diffstat (limited to 'tests/enum')
-rw-r--r--tests/enum/tenum.nim16
-rw-r--r--tests/enum/tenum2.nim6
-rw-r--r--tests/enum/tenum3.nim6
-rw-r--r--tests/enum/tenumhole.nim4
-rw-r--r--tests/enum/tenummix.nim2
-rw-r--r--tests/enum/toptions.nim36
6 files changed, 35 insertions, 35 deletions
diff --git a/tests/enum/tenum.nim b/tests/enum/tenum.nim
index 6e53b9c08..b081212e6 100644
--- a/tests/enum/tenum.nim
+++ b/tests/enum/tenum.nim
@@ -1,8 +1,8 @@
-# Test enums

-

-type

-  E = enum a, b, c, x, y, z

-

-var

-  en: E

-en = a

+# Test enums
+
+type
+  E = enum a, b, c, x, y, z
+
+var
+  en: E
+en = a
diff --git a/tests/enum/tenum2.nim b/tests/enum/tenum2.nim
index feba36dd6..3e34a21ce 100644
--- a/tests/enum/tenum2.nim
+++ b/tests/enum/tenum2.nim
@@ -1,14 +1,14 @@
 # Test that enum with holes is handled correctly by case statement
 
 type
-  TEnumHole = enum 
+  TEnumHole = enum
     eA = 0,
     eB = 4,
     eC = 5
-    
+
 var
   e: TEnumHole = eB
-  
+
 case e
 of eA: echo "A"
 of eB: echo "B"
diff --git a/tests/enum/tenum3.nim b/tests/enum/tenum3.nim
index 09a516932..49cbf04d5 100644
--- a/tests/enum/tenum3.nim
+++ b/tests/enum/tenum3.nim
@@ -1,14 +1,14 @@
 # Test enum with explicit size
 
 type
-  TEnumHole {.size: sizeof(int).} = enum 
+  TEnumHole {.size: sizeof(int).} = enum
     eA = 0,
     eB = 4,
     eC = 5
-    
+
 var
   e: TEnumHole = eB
-  
+
 case e
 of eA: echo "A"
 of eB: echo "B"
diff --git a/tests/enum/tenumhole.nim b/tests/enum/tenumhole.nim
index a35526378..68b82e283 100644
--- a/tests/enum/tenumhole.nim
+++ b/tests/enum/tenumhole.nim
@@ -12,10 +12,10 @@ type
     valueB = strValB & "conc",
     valueC,
     valueD = (4, "abc")
- 
+
 # test the new "proc body can be an expr" feature:
 proc getValue: TMyEnum = valueD
- 
+
 # trick the optimizer with a variable:
 var x = getValue()
 echo valueA, ord(valueA), valueB, ord(valueB), valueC, valueD, ord(valueD), x
diff --git a/tests/enum/tenummix.nim b/tests/enum/tenummix.nim
index aaf0be2cb..4352cdd81 100644
--- a/tests/enum/tenummix.nim
+++ b/tests/enum/tenummix.nim
@@ -7,5 +7,5 @@ discard """
 type
   TE1 = enum eA, eB
   TE2 = enum eC, eD
-  
+
 assert eA != eC
diff --git a/tests/enum/toptions.nim b/tests/enum/toptions.nim
index 3c841de2c..e53acb2b3 100644
--- a/tests/enum/toptions.nim
+++ b/tests/enum/toptions.nim
@@ -1,18 +1,18 @@
-

-type

-  # please make sure we have under 32 options (improves code efficiency!)

-  TOption = enum

-    optNone, optForceFullMake, optBoehmGC, optRefcGC, optRangeCheck,

-    optBoundsCheck, optOverflowCheck, optNilCheck, optAssert, optLineDir,

-    optWarns, optHints, optDeadCodeElim, optListCmd, optCompileOnly,

-    optSafeCode,             # only allow safe code

-    optStyleCheck, optOptimizeSpeed, optOptimizeSize, optGenDynLib,

-    optGenGuiApp, optStackTrace

-

-  TOptionset = set[TOption]

-

-var

-  gOptions: TOptionset = {optRefcGC, optRangeCheck, optBoundsCheck,

-    optOverflowCheck, optAssert, optWarns, optHints, optLineDir, optStackTrace}

-  compilerArgs: int

-  gExitcode: int8

+
+type
+  # please make sure we have under 32 options (improves code efficiency!)
+  TOption = enum
+    optNone, optForceFullMake, optBoehmGC, optRefcGC, optRangeCheck,
+    optBoundsCheck, optOverflowCheck, optNilCheck, optAssert, optLineDir,
+    optWarns, optHints, optDeadCodeElim, optListCmd, optCompileOnly,
+    optSafeCode,             # only allow safe code
+    optStyleCheck, optOptimizeSpeed, optOptimizeSize, optGenDynLib,
+    optGenGuiApp, optStackTrace
+
+  TOptionset = set[TOption]
+
+var
+  gOptions: TOptionset = {optRefcGC, optRangeCheck, optBoundsCheck,
+    optOverflowCheck, optAssert, optWarns, optHints, optLineDir, optStackTrace}
+  compilerArgs: int
+  gExitcode: int8