forked from junit-team/junit4
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a checkbox to UI test runner so that user can switch
between the standard and loading testcase class loader. [ #229753 ] assertEquals on NaN and Infinity does not work correctly [ #229287 ] Class Name too long "SimpleClassPathTestCollector" [ #229609 ] Stack Filtering missing in textui.TesRunner [ #229753 ] assertEquals on NaN and Infinity does not work correctly. [ #229870 ] Clicking on ... after tests failed gives NPE [ #229974 ] Incorrect icon shown for first element in Swing GUI [ #230581 ] swingui.TestTreeModel: results of decorated testcases... [ #230971 ] Make junit.extensions.TestDecorator.getTest() public [ #231569 ] DocBug: JUnit Test Infected: Programmers Love Writing Tests [ #232645 ] BaseTestRunner.getTest loses exception information [ #233094 ] TestSuite masks exceptions [ #410967 ] No icon provided for first test [ #230745 ] ClassPathTestCollector sometimes lists classes in duplicate
- Loading branch information
egamma
committed
Apr 1, 2001
1 parent
1e752dc
commit bfc94ee
Showing
19 changed files
with
307 additions
and
113 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
package junit.awtui; | ||
|
||
import java.awt.*; | ||
import java.awt.event.*; | ||
|
||
import junit.runner.Version; | ||
|
||
class WarningDialog extends Dialog { | ||
private boolean fChoice; | ||
|
||
public WarningDialog(Frame parent, String message1, String message2) { | ||
super(parent); | ||
|
||
setResizable(false); | ||
setLayout(new GridBagLayout()); | ||
setSize(450, 120); | ||
setTitle("Warning"); | ||
setModal(true); | ||
setLocation(300, 300); | ||
|
||
Button yes= new Button("Yes"); | ||
yes.addActionListener( | ||
new ActionListener() { | ||
public void actionPerformed(ActionEvent e) { | ||
fChoice= true; | ||
dispose(); | ||
} | ||
} | ||
); | ||
|
||
Button no= new Button("No"); | ||
no.addActionListener( | ||
new ActionListener() { | ||
public void actionPerformed(ActionEvent e) { | ||
fChoice= false; | ||
dispose(); | ||
} | ||
} | ||
); | ||
|
||
Label label1= new Label(message1); | ||
Label label2= new Label(message2); | ||
|
||
GridBagConstraints constraintsLabel1= new GridBagConstraints(); | ||
constraintsLabel1.gridx= 0; constraintsLabel1.gridy = 0; | ||
constraintsLabel1.gridwidth= 1; constraintsLabel1.gridheight= 1; | ||
constraintsLabel1.anchor= GridBagConstraints.WEST; | ||
add(label1, constraintsLabel1); | ||
|
||
GridBagConstraints constraintsLabel2= new GridBagConstraints(); | ||
constraintsLabel2.gridx= 0; constraintsLabel2.gridy= 1; | ||
constraintsLabel2.gridwidth= 2; constraintsLabel2.gridheight= 1; | ||
constraintsLabel2.anchor= GridBagConstraints.WEST; | ||
add(label2, constraintsLabel2); | ||
|
||
GridBagConstraints constraintsYes= new GridBagConstraints(); | ||
constraintsYes.gridx= 0; constraintsYes.gridy= 2; | ||
constraintsYes.gridwidth= 1; constraintsYes.gridheight= 1; | ||
constraintsYes.anchor= GridBagConstraints.EAST; | ||
add(yes, constraintsYes); | ||
|
||
GridBagConstraints constraintsNo= new GridBagConstraints(); | ||
constraintsNo.gridx= 1; constraintsNo.gridy= 2; | ||
constraintsNo.gridwidth= 1; constraintsNo.gridheight= 1; | ||
constraintsNo.anchor= GridBagConstraints.WEST; | ||
add(no, constraintsNo); | ||
|
||
addWindowListener( | ||
new WindowAdapter() { | ||
public void windowClosing(WindowEvent e) { | ||
dispose(); | ||
} | ||
} | ||
); | ||
} | ||
|
||
public boolean getChoice() { | ||
return fChoice; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.