Tools__BreakpointBrowser.st
changeset 12526 dc89c5a91cfc
parent 12022 e17a81add015
child 12561 0766dc3e8079
child 12571 b2e5fdb702cb
--- a/Tools__BreakpointBrowser.st	Tue Mar 26 01:01:56 2013 +0100
+++ b/Tools__BreakpointBrowser.st	Tue Mar 26 01:43:36 2013 +0100
@@ -16,10 +16,10 @@
 ApplicationModel subclass:#BreakpointBrowser
 	instanceVariableNames:'updatingLabelShown breakpointList shownCopyOfBreakpointList
 		selectionIndexHolder currentSortColumn currentSortIsReverse
-		showHalts showOthers showAssertions showCodeBreakpoints
-		showCodeBreakpointsFor showMethodBreakpoints showLineBreakpoints
-		showDebugCode codeView infoHolder updateProcess
-		showWhichHaltsHolder'
+		showHalts showOthers showAssertions showAssertionsInTests
+		showCodeBreakpoints showCodeBreakpointsFor showMethodBreakpoints
+		showLineBreakpoints showDebugCode codeView infoHolder
+		updateProcess showWhichHaltsHolder'
 	classVariableNames:'MessagesAndTypes'
 	poolDictionaries:''
 	category:'Interface-Smalltalk-Breakpoints'
@@ -314,6 +314,13 @@
                   indication: showAssertions
                 )
                (MenuItem
+                  enabled: showAssertions
+                  label: 'Assertions in Tests'
+                  itemValue: showAssertionsInTests:
+                  hideMenuOnActivated: false
+                  indication: showAssertionsInTests
+                )
+               (MenuItem
                   label: 'Halts'
                   itemValue: showHalts:
                   hideMenuOnActivated: false
@@ -883,6 +890,15 @@
     self updateShownBreakpointList
 !
 
+showAssertionsInTests
+    ^ showAssertionsInTests ? false
+!
+
+showAssertionsInTests:aBoolean
+    showAssertionsInTests := aBoolean.
+    self updateShownBreakpointList
+!
+
 showCodeBreakpoints
     ^ showCodeBreakpoints ? true
 !
@@ -985,6 +1001,14 @@
     ].
     self showAssertions ifFalse:[
         newList := newList reject:[:entry | entry isAssertion].
+    ] ifTrue:[
+        self showAssertionsInTests ifFalse:[
+            newList := newList reject:[:entry | |cls|
+                                                entry isAssertion
+                                                and:[ (entry selector startsWith:'test')
+                                                and:[ (cls := Smalltalk classNamed: entry className) notNil
+                                                      and:[ cls theNonMetaclass isTestCaseLike ]]]].
+        ].
     ].
 
     self showHalts ifFalse:[
@@ -1836,11 +1860,12 @@
 !BreakpointBrowser class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libtool/Tools__BreakpointBrowser.st,v 1.39 2012-11-04 14:02:58 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/Tools__BreakpointBrowser.st,v 1.40 2013-03-26 00:43:36 cg Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libtool/Tools__BreakpointBrowser.st,v 1.39 2012-11-04 14:02:58 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/Tools__BreakpointBrowser.st,v 1.40 2013-03-26 00:43:36 cg Exp $'
 ! !
 
+
 BreakpointBrowser initialize!