#REFACTORING
class: RegressionTests::Win32OLETests
changed: #test01_SysAllocString
--- a/RegressionTests__Win32OLETests.st Wed Mar 23 19:31:22 2016 +0100
+++ b/RegressionTests__Win32OLETests.st Tue Mar 29 03:42:35 2016 +0200
@@ -1,3 +1,5 @@
+"{ Encoding: utf8 }"
+
"{ Package: 'exept:regression' }"
"{ NameSpace: RegressionTests }"
@@ -54,8 +56,10 @@
rslt := ole SysAllocString: 'hello World'.
self assert:(rslt notNil).
- bstr := BSTR atAddress:rslt.
-self halt.
+ self assert:(rslt sizeInBytes == (4 + ('hello World' size * 2) "+ 2")).
+ self assert:(rslt sizeInCharacters == 'hello World' size).
+ self assert:(rslt characterAt:1) == $h.
+ self assert:(rslt characterAt:2) == $e.
"
self new test01_SysAllocString