Mercurial > projects > dynamin
changeset 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 | 340c3777ea68 |
files | dynamin/gui/window.d |
diffstat | 1 files changed, 19 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/dynamin/gui/window.d Mon Aug 10 02:48:15 2009 -0500 +++ b/dynamin/gui/window.d Mon Aug 10 03:22:42 2009 -0500 @@ -289,7 +289,6 @@ _minSize = Size(0, 0); _maxSize = Size(0, 0); _borderStyle = WindowBorderStyle.Normal; - recreateHandle(); } /// ditto this(string text) { @@ -593,3 +592,22 @@ } } +unittest { + auto w = new Window; + assert(!w.handleCreated); + w.content = new Panel; + assert(!w.handleCreated); + w.location = Point(5, 5); + assert(!w.handleCreated); + w.size = Size(100, 100); + assert(!w.handleCreated); + w.position = Position.Right; + assert(!w.handleCreated); + w.text = "Test Text"; + assert(!w.handleCreated); + w.borderStyle = WindowBorderStyle.Tool; + assert(!w.handleCreated); + w.state = WindowState.Maximized; + assert(!w.handleCreated); +} +