Mercurial > projects > dynamin
comparison dynamin/gui/window.d @ 69:b5460ba7c93e
Add test that Window.handle isn't created prematurely
author | Jordan Miner <jminer7@gmail.com> |
---|---|
date | Mon, 10 Aug 2009 03:22:42 -0500 |
parents | 6580fabb7dce |
children | 68be24186634 |
comparison
equal
deleted
inserted
replaced
68:6580fabb7dce | 69:b5460ba7c93e |
---|---|
287 | 287 |
288 _visible = false; | 288 _visible = false; |
289 _minSize = Size(0, 0); | 289 _minSize = Size(0, 0); |
290 _maxSize = Size(0, 0); | 290 _maxSize = Size(0, 0); |
291 _borderStyle = WindowBorderStyle.Normal; | 291 _borderStyle = WindowBorderStyle.Normal; |
292 recreateHandle(); | |
293 } | 292 } |
294 /// ditto | 293 /// ditto |
295 this(string text) { | 294 this(string text) { |
296 this(); | 295 this(); |
297 this.text = text; | 296 this.text = text; |
591 } | 590 } |
592 location = newLoc; | 591 location = newLoc; |
593 } | 592 } |
594 } | 593 } |
595 | 594 |
595 unittest { | |
596 auto w = new Window; | |
597 assert(!w.handleCreated); | |
598 w.content = new Panel; | |
599 assert(!w.handleCreated); | |
600 w.location = Point(5, 5); | |
601 assert(!w.handleCreated); | |
602 w.size = Size(100, 100); | |
603 assert(!w.handleCreated); | |
604 w.position = Position.Right; | |
605 assert(!w.handleCreated); | |
606 w.text = "Test Text"; | |
607 assert(!w.handleCreated); | |
608 w.borderStyle = WindowBorderStyle.Tool; | |
609 assert(!w.handleCreated); | |
610 w.state = WindowState.Maximized; | |
611 assert(!w.handleCreated); | |
612 } | |
613 |