File tree Expand file tree Collapse file tree 2 files changed +26
-0
lines changed
Expand file tree Collapse file tree 2 files changed +26
-0
lines changed Original file line number Diff line number Diff line change 1+ import RemObjects. Elements. EUnit
2+
3+ public class DictionaryTests : Test {
4+
5+ public func test82211( ) {
6+
7+ var dict = [ String: String] ( )
8+ dict [ " test " ] = " someString "
9+
10+ writeLn ( " dict[ \" test \" ] \( dict [ " test " ] ) " )
11+
12+ Check . AreEqual ( dict [ " test " ] , " someString " ) // good
13+ Check . IsNotNil ( dict [ " test " ] ) // good
14+ Check . IsTrue ( assigned ( dict [ " test " ] ) ) // fails
15+ Check . IsTrue ( dict [ " test " ] != nil ) // fails
16+ writeLn ( " dict[ \" test \" ] != nil \( dict [ " test " ] != nil ) " ) // False
17+ writeLn ( " dict[ \" test \" ] == nil \( dict [ " test " ] == nil ) " ) // True
18+
19+ let hasValue : Bool = dict [ " test " ] != nil
20+ writeLn ( " hasValue \( hasValue) " )
21+ if !hasValue {
22+ throw Exception ( " dict[test] is not nil! " )
23+ }
24+ }
25+ }
Original file line number Diff line number Diff line change 146146 <ItemGroup >
147147 <Compile Include =" Program.swift" />
148148 <Compile Include =" Range.swift" />
149+ <Compile Include =" Dictionary.swift" />
149150 </ItemGroup >
150151 <Import Project =" $(MSBuildExtensionsPath)\RemObjects Software\Elements\RemObjects.Elements.targets" />
151152 <Import Project =" ..\Source\Swift.Shared.projitems" Label =" Shared" />
You can’t perform that action at this time.
0 commit comments