module matcher_shallow\r
\r
+import qualified Text\r
+from Text import class Text, instance Text String\r
import StdEnv\r
\r
Contains :: a [a] -> Bool | == a\r
Contains x xs = foldl (\b y . b || x == y) False xs\r
\r
+ContainsString :: String String -> Bool\r
+ContainsString x y = 'Text'.indexOf x y <> -1\r
+\r
EqualTo :: a a -> Bool | == a\r
EqualTo x y = x == y\r
\r
a4 = AssertThat "[0..3] (Contains 2)" [0..3] (Contains 2)\r
a5 = AssertThat "[0..3] (Contains 7)" [0..3] (Contains 7)\r
a6 = AssertThat "[0..3] (Either (EqualTo [1]) (Contains 7))" [0..3] (EqualTo [1] Or (Contains 7))\r
+a7 = AssertThat "'hello world' (ContainsString 'hello')" "hello world" (ContainsString "hello")\r
+a8 = AssertThat "'hello world' (ContainsString 'world')" "hello world" (ContainsString "world")\r
+a9 = AssertThat "Red, yellow and blue" "Who is afraid of red, yellow and blue" (ContainsString "Red")\r
\r
-report = test (a1*a2*a3*a4*a5*a6)\r
+report = test (a1*a2*a3*a4*a5*a6*a7*a8*a9)\r
\r
instance <<< [String] where\r
(<<<) file [] = file\r
ExportedNames: \r
Paths\r
Path: {Project}\r
+ Path: {Application}\iTasks-SDK\Dependencies\clean-platform\src\libraries\OS-Independent\r
Precompile: \r
Postlink: \r
MainModule\r
ReuseUniqueNodes: True\r
Fusion: False\r
OtherModules\r
+ Module\r
+ Name: Text\r
+ Dir: {Application}\iTasks-SDK\Dependencies\clean-platform\src\libraries\OS-Independent\r
+ Compiler\r
+ NeverMemoryProfile: False\r
+ NeverTimeProfile: False\r
+ StrictnessAnalysis: True\r
+ ListTypes: StrictExportTypes\r
+ ListAttributes: True\r
+ Warnings: True\r
+ Verbose: True\r
+ ReadableABC: False\r
+ ReuseUniqueNodes: True\r
+ Fusion: False\r
Module\r
Name: StdArray\r
Dir: {Application}\Libraries\StdEnv\r