#BUGFIX by stefan
authorStefan Vogel <sv@exept.de>
Fri, 11 May 2018 13:51:31 +0200
changeset 1928 a7e400e70e65
parent 1927 ac82d7231d95
child 1929 ed3d2078410e
#BUGFIX by stefan class: RegressionTests::CompilerTests2 comment/format in: #method_argAndVarNames_02 changed: #test_external_function_call_01a #test_external_function_call_01b #test_external_function_call_01c class: RegressionTests::CompilerTests2 class added: #libraryName
RegressionTests__CompilerTests2.st
--- a/RegressionTests__CompilerTests2.st	Fri May 11 01:09:59 2018 +0200
+++ b/RegressionTests__CompilerTests2.st	Fri May 11 13:51:31 2018 +0200
@@ -1,3 +1,5 @@
+"{ Encoding: utf8 }"
+
 "{ Package: 'stx:goodies/regression' }"
 
 "{ NameSpace: RegressionTests }"
@@ -12,6 +14,14 @@
 !
 
 
+!CompilerTests2 class methodsFor:'settings'!
+
+libraryName
+    ^ 'librun'
+
+    "Created: / 11-05-2018 / 13:50:32 / stefan"
+! !
+
 !CompilerTests2 methodsFor:'private'!
 
 assertSendersMethodIsIdenticalTo: sendersMethod
@@ -130,15 +140,15 @@
 
 method_argAndVarNames_02
     #(1 2 3 4) select:[:each |
-	| isEven |
+        | isEven |
 
-	'1234' select:[:char |
-	    | someOtherLocal |
+        '1234' select:[:char |
+            | someOtherLocal |
 
-	    someOtherLocal := char == $1.
-	].
-	isEven := each even.
-	self saveContext.
+            someOtherLocal := char == $1.
+        ].
+        isEven := each even.
+        self saveContext.
     ].
 
     "Created: / 20-08-2013 / 09:17:01 / Jan Vrany <jan.vrany@fit.cvut.cz>"
@@ -838,94 +848,96 @@
 test_external_function_call_01a
     "Test for stx bug for <cdecl> specs like
 
-	<cdecl: Cairo::FontFace 'cairo_get_font_face' ( Cairo::GraphicsContext ) >
+        <cdecl: Cairo::FontFace 'cairo_get_font_face' ( Cairo::GraphicsContext ) >
 
      i.e., when custom subclass of ExternalAddress is in namespace."
 
     | malloc  free |
 
     malloc := 'malloc: size
+    <cdecl: const RegressionTests::CompilerTests2ExternalBytes "malloc" ( int ) module: ''librun.so''>
+    self primitiveFailed'.
 
-    <cdecl: const RegressionTests::CompilerTests2ExternalBytes "malloc" ( int ) module: ''librun.so''>
-    self primitive failed'.
     free := 'free: ptr
+    <cdecl: const void "free" ( RegressionTests::CompilerTests2ExternalBytes ) module: ''librun.so''>
+    self primitiveFailed'.
 
-    <cdecl: const void "free" ( RegressionTests::CompilerTests2ExternalBytes ) module: ''librun.so''>
-    self primitive failed'.
     #( #bc #stc ) do:[:mode |
-	| ptr |
+        | ptr |
 
-	self compile:malloc mode:mode.
-	self compile:free mode:mode.
-	ptr := self perform:(mode , '_malloc:') asSymbol with:1.
-	self assert:ptr class == RegressionTests::CompilerTests2ExternalBytes.
-	self perform:(mode , '_free:') asSymbol with:ptr.
+        self compile:malloc mode:mode.
+        self compile:free mode:mode.
+        ptr := self perform:(mode , '_malloc:') asSymbol with:1.
+        self assert:ptr class == RegressionTests::CompilerTests2ExternalBytes.
+        self perform:(mode , '_free:') asSymbol with:ptr.
     ]
 
     "Created: / 06-01-2014 / 11:29:10 / Jan Vrany <jan.vrany@fit.cvut.cz>"
     "Modified: / 20-09-2014 / 21:51:53 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 11-05-2018 / 13:45:11 / stefan"
 !
 
 test_external_function_call_01b
     "Test for stx bug for <cdecl> specs like
 
-	<cdecl: Cairo::FontFace 'cairo_get_font_face' ( Cairo::GraphicsContext ) >
+        <cdecl: Cairo::FontFace 'cairo_get_font_face' ( Cairo::GraphicsContext ) >
 
      i.e., when custom subclass of ExternalAddress is in namespace."
 
     | malloc  free |
 
     malloc := 'malloc: size
-
     <cdecl: const RegressionTests::CompilerTests2ExternalBytes "malloc" ( int ) module: ''librun''>
     self primitive failed'.
+
     free := 'free: ptr
-
     <cdecl: const void "free" ( RegressionTests::CompilerTests2ExternalBytes ) module: ''librun''>
     self primitive failed'.
     #( #bc #stc ) do:[:mode |
-	| ptr |
+        | ptr |
 
-	self compile:malloc mode:mode.
-	self compile:free mode:mode.
-	ptr := self perform:(mode , '_malloc:') asSymbol with:1.
-	self assert:ptr class == RegressionTests::CompilerTests2ExternalBytes.
-	self perform:(mode , '_free:') asSymbol with:ptr.
+        self compile:malloc mode:mode.
+        self compile:free mode:mode.
+        ptr := self perform:(mode , '_malloc:') asSymbol with:1.
+        self assert:ptr class == RegressionTests::CompilerTests2ExternalBytes.
+        self perform:(mode , '_free:') asSymbol with:ptr.
     ]
 
     "Created: / 06-01-2014 / 11:29:10 / Jan Vrany <jan.vrany@fit.cvut.cz>"
     "Modified: / 20-09-2014 / 21:51:53 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 11-05-2018 / 13:44:09 / stefan"
 !
 
 test_external_function_call_01c
     "Test for stx bug for <cdecl> specs like
 
-	<cdecl: Cairo::FontFace 'cairo_get_font_face' ( Cairo::GraphicsContext ) >
+        <cdecl: Cairo::FontFace 'cairo_get_font_face' ( Cairo::GraphicsContext ) >
 
      i.e., when custom subclass of ExternalAddress is in namespace."
 
     | malloc  free |
 
     malloc := 'malloc: size
+    <cdecl: const RegressionTests::CompilerTests2ExternalBytes "malloc" ( int )>
+    self primitiveFailed'.
 
-    <cdecl: const RegressionTests::CompilerTests2ExternalBytes "malloc" ( int )>
-    self primitive failed'.
     free := 'free: ptr
+    <cdecl: const void "free" ( RegressionTests::CompilerTests2ExternalBytes)>
+    self primitiveFailed'.
 
-    <cdecl: const void "free" ( RegressionTests::CompilerTests2ExternalBytes )>
-    self primitive failed'.
     #( #bc #stc ) do:[:mode |
-	| ptr |
+        | ptr |
 
-	self compile:malloc mode:mode.
-	self compile:free mode:mode.
-	ptr := self perform:(mode , '_malloc:') asSymbol with:1.
-	self assert:ptr class == RegressionTests::CompilerTests2ExternalBytes.
-	self perform:(mode , '_free:') asSymbol with:ptr.
+        self compile:malloc mode:mode.
+        self compile:free mode:mode.
+        ptr := self perform:(mode , '_malloc:') asSymbol with:1.
+        self assert:ptr class == RegressionTests::CompilerTests2ExternalBytes.
+        self perform:(mode , '_free:') asSymbol with:ptr.
     ]
 
     "Created: / 06-01-2014 / 11:29:10 / Jan Vrany <jan.vrany@fit.cvut.cz>"
     "Modified: / 20-09-2014 / 21:51:53 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 11-05-2018 / 13:45:47 / stefan"
 ! !
 
 !CompilerTests2 methodsFor:'tests - arg & var names'!