Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

- Added testcase

svn path=/trunk/winforms/; revision=39065
  • Loading branch information...
commit f41a741dcb03ff17753b2ede058bb8a5d0cd712e 1 parent a3c2af2
Peter Dennis Bartok authored
Showing with 21 additions and 3 deletions.
  1. +2 −2 various/Makefile
  2. +19 −1 various/swf-various.cs
View
4 various/Makefile
@@ -1,10 +1,10 @@
all: mono
mono: swf-various.cs
- mcs swf-various.cs /r:System.Windows.Forms.dll /r:System.Drawing.dll
+ mcs swf-various.cs /r:System.Windows.Forms.dll /r:System.Drawing.dll /r:Accessibility.dll
dotnet: swf-zorder.cs
- csc swf-various.cs /r:System.Windows.Forms.dll /r:System.Drawing.dll
+ csc swf-various.cs /r:System.Windows.Forms.dll /r:System.Drawing.dll /r:Accessibility.dll
clean:
rm swf-various.exe -r -f
View
20 various/swf-various.cs
@@ -222,6 +222,23 @@ class MainWindow : System.Windows.Forms.Form {
}
}
+ int pre_scale_width = this.ClientSize.Width;
+
+ this.Scale(2);
+ this.Scale(1);
+
+ if (this.ClientSize.Width != (pre_scale_width * 2)) {
+ failed++;
+ if (verbose > 0) {
+ Console.WriteLine("{0}: this.Scale(2); this.Scale(1) failed, width: {1}, expected {2}", test_no, this.ClientSize.Width, pre_scale_width * 2);
+ }
+ test_no++;
+ } else {
+ if (verbose > 0) {
+ Console.WriteLine("Test {0} passed", test_no++);
+ }
+ }
+
if (visual) {
if (failed == 0) {
MessageBox.Show("All Tests Passed!", "Success");
@@ -229,7 +246,8 @@ class MainWindow : System.Windows.Forms.Form {
MessageBox.Show(failed + "tests failed, check the log", "Failure");
}
}
- }
+
+ }
public static int Main(string[] args) {
if (args.Length > 0) {
Please sign in to comment.
Something went wrong with that request. Please try again.