Author: gert
Date: 2007-07-21 08:19:27 -0400 (Sat, 21 Jul 2007)
New Revision: 82412
Added:
trunk/gert/interactive/bug82151/
trunk/gert/interactive/bug82151/MainForm.cs
trunk/gert/interactive/bug82151/default.build
Modified:
trunk/gert/interactive/bug81847/MainForm.cs
Log:
Added test for bug #82151. Improved test for bug #81847.
Modified: trunk/gert/interactive/bug81847/MainForm.cs
===================================================================
--- trunk/gert/interactive/bug81847/MainForm.cs 2007-07-21 09:15:36 UTC (rev
82411)
+++ trunk/gert/interactive/bug81847/MainForm.cs 2007-07-21 12:19:27 UTC (rev
82412)
@@ -208,14 +208,12 @@
"1. Click the Reset button.{0}{0}" +
"2. Check the LabelEdit checkbox.{0}{0}" +
"3. Click the text of Node1 (2x).{0}{0}" +
- "4. Press Right-Arrow key.{0}{0}" +
- "5. Press E key.{0}{0}" +
- "6. Press Backspace key.{0}{0}" +
- "7. Press Enter key.{0}{0}" +
+ "4. Change the label to \"New\".{0}{0}" +
+ "5. Press Esc key.{0}{0}" +
"Expected result:{0}{0}" +
"1. The following events have fired:{0}{0}" +
" TreeView => BeforeLabelEdit (Node1 => null){0}" +
- " TreeView => AfterLabelEdit (Node1 => Node1){0}{0}" +
+ " TreeView => AfterLabelEdit (Node1 => null){0}{0}" +
"2. The label of the node has not changed.",
Environment.NewLine);
//
@@ -235,12 +233,16 @@
"Steps to execute:{0}{0}" +
"1. Click the Reset button.{0}{0}" +
"2. Check the LabelEdit checkbox.{0}{0}" +
- "3. Check the Before cancel checkbox.{0}{0}" +
- "4. Click the text of Node1 (2x).{0}{0}" +
+ "3. Click the text of Node1 (2x).{0}{0}" +
+ "4. Press Right-Arrow key.{0}{0}" +
+ "5. Press E key.{0}{0}" +
+ "6. Press Backspace key.{0}{0}" +
+ "7. Press Enter key.{0}{0}" +
"Expected result:{0}{0}" +
"1. The following events have fired:{0}{0}" +
- " TreeView => BeforeLabelEdit (Node1 => null){0}{0}" +
- "2. The label of the node cannot be edited.",
+ " TreeView => BeforeLabelEdit (Node1 => null){0}" +
+ " TreeView => AfterLabelEdit (Node1 => Node1){0}{0}" +
+ "2. The label of the node has not changed.",
Environment.NewLine);
//
// _tabPage4
@@ -259,15 +261,12 @@
"Steps to execute:{0}{0}" +
"1. Click the Reset button.{0}{0}" +
"2. Check the LabelEdit checkbox.{0}{0}" +
- "3. Check the After cancel checkbox.{0}{0}" +
- "4. Click text of Node1.{0}{0}" +
- "5. Change the label to \"New\".{0}{0}" +
- "6. Press Enter key.{0}{0}" +
+ "3. Check the Before cancel checkbox.{0}{0}" +
+ "4. Click the text of Node1 (2x).{0}{0}" +
"Expected result:{0}{0}" +
"1. The following events have fired:{0}{0}" +
- " TreeView => BeforeLabelEdit (Node1 => null){0}" +
- " TreeView => AfterLabelEdit (Node1 => New){0}{0}" +
- "2. The label of the node has not changed.",
+ " TreeView => BeforeLabelEdit (Node1 => null){0}{0}" +
+ "2. The label of the node cannot be edited.",
Environment.NewLine);
//
// _tabPage5
@@ -285,10 +284,16 @@
_bugDescriptionText6.Text = string.Format
(CultureInfo.InvariantCulture,
"Steps to execute:{0}{0}" +
"1. Click the Reset button.{0}{0}" +
- "2. Click text of Node1.{0}{0}" +
+ "2. Check the LabelEdit checkbox.{0}{0}" +
+ "3. Check the After cancel checkbox.{0}{0}" +
+ "4. Click text of Node1.{0}{0}" +
+ "5. Change the label to \"New\".{0}{0}" +
+ "6. Press Enter key.{0}{0}" +
"Expected result:{0}{0}" +
- "1. No events have fired.{0}{0}" +
- "2. The label of the node cannot be edited.",
+ "1. The following events have fired:{0}{0}" +
+ " TreeView => BeforeLabelEdit (Node1 => null){0}" +
+ " TreeView => AfterLabelEdit (Node1 => New){0}{0}" +
+ "2. The label of the node has not changed.",
Environment.NewLine);
//
// _tabPage6
@@ -298,6 +303,27 @@
_tabPage6.Controls.Add (_bugDescriptionText6);
_tabControl.Controls.Add (_tabPage6);
//
+ // _bugDescriptionText7
+ //
+ _bugDescriptionText7 = new TextBox ();
+ _bugDescriptionText7.Dock = DockStyle.Fill;
+ _bugDescriptionText7.Multiline = true;
+ _bugDescriptionText7.Text = string.Format
(CultureInfo.InvariantCulture,
+ "Steps to execute:{0}{0}" +
+ "1. Click the Reset button.{0}{0}" +
+ "2. Click text of Node1.{0}{0}" +
+ "Expected result:{0}{0}" +
+ "1. No events have fired.{0}{0}" +
+ "2. The label of the node cannot be edited.",
+ Environment.NewLine);
+ //
+ // _tabPage7
+ //
+ _tabPage7 = new TabPage ();
+ _tabPage7.Text = "#7";
+ _tabPage7.Controls.Add (_bugDescriptionText7);
+ _tabControl.Controls.Add (_tabPage7);
+ //
// InstructionsForm
//
ClientSize = new Size (330, 360);
@@ -312,6 +338,7 @@
private TextBox _bugDescriptionText4;
private TextBox _bugDescriptionText5;
private TextBox _bugDescriptionText6;
+ private TextBox _bugDescriptionText7;
private TabControl _tabControl;
private TabPage _tabPage1;
private TabPage _tabPage2;
@@ -319,4 +346,5 @@
private TabPage _tabPage4;
private TabPage _tabPage5;
private TabPage _tabPage6;
+ private TabPage _tabPage7;
}
Added: trunk/gert/interactive/bug82151/MainForm.cs
===================================================================
--- trunk/gert/interactive/bug82151/MainForm.cs 2007-07-21 09:15:36 UTC (rev
82411)
+++ trunk/gert/interactive/bug82151/MainForm.cs 2007-07-21 12:19:27 UTC (rev
82412)
@@ -0,0 +1,149 @@
+using System;
+using System.Drawing;
+using System.Globalization;
+using System.Windows.Forms;
+
+class MainForm : Form
+{
+ public MainForm ()
+ {
+ //
+ // _toolStrip
+ //
+ _toolStrip = new ToolStrip ();
+ _toolStrip.Renderer = new ToolStripSystemRenderer ();
+ Controls.Add (_toolStrip);
+ //
+ // _toolStripButton1
+ //
+ _toolStripButton1 = new ToolStripButton ();
+ _toolStripButton1.Text = "1";
+ _toolStrip.Items.Add (_toolStripButton1);
+ //
+ // _toolStripButton2
+ //
+ _toolStripButton2 = new ToolStripButton ();
+ _toolStripButton2.Checked = true;
+ _toolStripButton2.Text = "2";
+ _toolStrip.Items.Add (_toolStripButton2);
+ //
+ // _toolStripButton3
+ //
+ _toolStripButton3 = new ToolStripButton ();
+ _toolStripButton3.Text = "3";
+ _toolStrip.Items.Add (_toolStripButton3);
+ //
+ // _checkedGroupBox
+ //
+ _checkedGroupBox = new GroupBox ();
+ _checkedGroupBox.Location = new Point (20, 35);
+ _checkedGroupBox.Size = new Size (260, 85);
+ _checkedGroupBox.Text = "Checked";
+ Controls.Add (_checkedGroupBox);
+ //
+ // _button1CheckBox
+ //
+ _button1CheckBox = new CheckBox ();
+ _button1CheckBox.Checked = _toolStripButton1.Checked;
+ _button1CheckBox.Location = new Point (8, 16);
+ _button1CheckBox.Text = "1";
+ _checkedGroupBox.Controls.Add (_button1CheckBox);
+ _button1CheckBox.CheckedChanged += delegate (object sender,
EventArgs e) {
+ _toolStripButton1.Checked = _button1CheckBox.Checked;
+ };
+ //
+ // _button2CheckBox
+ //
+ _button2CheckBox = new CheckBox ();
+ _button2CheckBox.Checked = _toolStripButton2.Checked;
+ _button2CheckBox.Location = new Point (8, 35);
+ _button2CheckBox.Text = "2";
+ _checkedGroupBox.Controls.Add (_button2CheckBox);
+ _button2CheckBox.CheckedChanged += delegate (object sender,
EventArgs e) {
+ _toolStripButton2.Checked = _button2CheckBox.Checked;
+ };
+ //
+ // _button3CheckBox
+ //
+ _button3CheckBox = new CheckBox ();
+ _button3CheckBox.Checked = _toolStripButton3.Checked;
+ _button3CheckBox.Location = new Point (8, 55);
+ _button3CheckBox.Text = "3";
+ _checkedGroupBox.Controls.Add (_button3CheckBox);
+ _button3CheckBox.CheckedChanged += delegate (object sender,
EventArgs e) {
+ _toolStripButton3.Checked = _button3CheckBox.Checked;
+ };
+ //
+ // MainForm
+ //
+ ClientSize = new Size (300, 140);
+ Location = new Point (250, 100);
+ StartPosition = FormStartPosition.Manual;
+ Text = "bug #82151";
+ Load += new EventHandler (MainForm_Load);
+ }
+
+ [STAThread]
+ static void Main ()
+ {
+ Application.Run (new MainForm ());
+ }
+
+ void MainForm_Load (object sender, EventArgs e)
+ {
+ InstructionsForm instructionsForm = new InstructionsForm ();
+ instructionsForm.Show ();
+ }
+
+ private ToolStrip _toolStrip;
+ private ToolStripButton _toolStripButton1;
+ private ToolStripButton _toolStripButton2;
+ private ToolStripButton _toolStripButton3;
+ private GroupBox _checkedGroupBox;
+ private CheckBox _button1CheckBox;
+ private CheckBox _button2CheckBox;
+ private CheckBox _button3CheckBox;
+}
+
+public class InstructionsForm : Form
+{
+ public InstructionsForm ()
+ {
+ //
+ // _tabControl
+ //
+ _tabControl = new TabControl ();
+ _tabControl.Dock = DockStyle.Fill;
+ Controls.Add (_tabControl);
+ //
+ // _bugDescriptionText1
+ //
+ _bugDescriptionText1 = new TextBox ();
+ _bugDescriptionText1.Dock = DockStyle.Fill;
+ _bugDescriptionText1.Multiline = true;
+ _bugDescriptionText1.Text = string.Format
(CultureInfo.InvariantCulture,
+ "Expected result on start-up:{0}{0}" +
+ "1. Button 2 is checked.{0}{0}" +
+ "2. Checking/unchecking one of the checkboxes modifies
the checked " +
+ " state of the corresponding button.",
+ Environment.NewLine);
+ //
+ // _tabPage1
+ //
+ _tabPage1 = new TabPage ();
+ _tabPage1.Text = "#1";
+ _tabPage1.Controls.Add (_bugDescriptionText1);
+ _tabControl.Controls.Add (_tabPage1);
+ //
+ // InstructionsForm
+ //
+ ClientSize = new Size (360, 135);
+ Location = new Point (600, 100);
+ StartPosition = FormStartPosition.Manual;
+ Text = "Instructions - bug #82151";
+ }
+
+ private TextBox _bugDescriptionText1;
+ private TabControl _tabControl;
+ private TabPage _tabPage1;
+}
Property changes on: trunk/gert/interactive/bug82151/MainForm.cs
___________________________________________________________________
Name: svn:eol-style
+ native
Added: trunk/gert/interactive/bug82151/default.build
===================================================================
--- trunk/gert/interactive/bug82151/default.build 2007-07-21 09:15:36 UTC
(rev 82411)
+++ trunk/gert/interactive/bug82151/default.build 2007-07-21 12:19:27 UTC
(rev 82412)
@@ -0,0 +1,54 @@
+<project name="bug82151" default="rebuild">
+ <target name="mono-2.0">
+ <property name="csc.defines"
value="NET_1_0,NET_1_1,NET_2_0,ONLY_2_0,MONO" />
+ </target>
+
+ <target name="net-2.0">
+ <property name="csc.defines"
value="NET_1_0,NET_1_1,NET_2_0,ONLY_2_0" />
+ </target>
+
+ <property name="frameworks" value="mono-2.0,net-2.0" />
+
+ <target name="clean">
+ <delete>
+ <fileset>
+ <include name="out" />
+ <include name="test.exe" />
+ </fileset>
+ </delete>
+ </target>
+
+ <target name="build">
+ <property name="original.targetframework"
value="${nant.settings.currentframework}" />
+
+ <foreach property="framework" item="String" in="${frameworks}"
delim=",">
+ <if test="${framework::exists(framework)}">
+ <property name="nant.settings.currentframework"
value="${framework}" />
+ <call
target="${nant.settings.currentframework}" />
+ <call target="run" />
+ <call target="clean" />
+ </if>
+ </foreach>
+
+ <property name="nant.settings.currentframework"
value="${original.targetframework}" />
+ </target>
+
+ <target name="compile">
+ <csc target="winexe" define="${csc.defines}" output="test.exe"
warnaserror="true" warninglevel="4">
+ <sources>
+ <include name="MainForm.cs" />
+ </sources>
+ <references>
+ <include name="System.Drawing.dll" />
+ <include name="System.Windows.Forms.dll" />
+ </references>
+ </csc>
+ </target>
+
+ <target name="run" depends="compile">
+ <exec program="test.exe" managed="true" output="out" />
+ <fail if="${file::exists('out')}" />
+ </target>
+
+ <target name="rebuild" depends="clean, build" />
+</project>
Property changes on: trunk/gert/interactive/bug82151/default.build
___________________________________________________________________
Name: svn:eol-style
+ native
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches