Tools__TestRunner2.st
changeset 10718 3153c8cd16ac
parent 10645 f354e7884fc4
child 11500 6d4470524d8b
child 12123 4bde08cebd48
equal deleted inserted replaced
10717:0552f9177ced 10718:3153c8cd16ac
    30 AbstractTestRunner subclass:#TestRunner2
    30 AbstractTestRunner subclass:#TestRunner2
    31 	instanceVariableNames:'classCategoryOrPackageTabIndexHolder classCategoryList
    31 	instanceVariableNames:'classCategoryOrPackageTabIndexHolder classCategoryList
    32 		packageList classList classListOutGeneratorHolder
    32 		packageList classList classListOutGeneratorHolder
    33 		classListInGeneratorHolder modeHolder detailsHolder
    33 		classListInGeneratorHolder modeHolder detailsHolder
    34 		failureListHolder failureSelectionHolder errorListHolder
    34 		failureListHolder failureSelectionHolder errorListHolder
    35 		errorSelectionHolder lastPass resultHolder lastBrowser'
    35 		errorSelectionHolder lastPass resultHolder lastBrowser
       
    36 		selectedResultHolder'
    36 	classVariableNames:'History'
    37 	classVariableNames:'History'
    37 	poolDictionaries:''
    38 	poolDictionaries:''
    38 	category:'SUnit-UI'
    39 	category:'SUnit-UI'
    39 !
    40 !
    40 
    41 
    44 	poolDictionaries:''
    45 	poolDictionaries:''
    45 	privateIn:TestRunner2
    46 	privateIn:TestRunner2
    46 !
    47 !
    47 
    48 
    48 ApplicationModel subclass:#ResultList
    49 ApplicationModel subclass:#ResultList
    49 	instanceVariableNames:'results resultsHolder selectiomHolder listHolder timestampFormat'
    50 	instanceVariableNames:'results resultsHolder selectiomHolder listHolder timestampFormat
       
    51 		selectionHolder'
    50 	classVariableNames:''
    52 	classVariableNames:''
    51 	poolDictionaries:''
    53 	poolDictionaries:''
    52 	privateIn:TestRunner2
    54 	privateIn:TestRunner2
    53 !
    55 !
    54 
    56 
   566              (Array
   568              (Array
   567                 
   569                 
   568                (SubChannelInfoSpec
   570                (SubChannelInfoSpec
   569                   subAspect: resultsHolder
   571                   subAspect: resultsHolder
   570                   aspect: resultHolder
   572                   aspect: resultHolder
       
   573                 ) 
       
   574                (SubChannelInfoSpec
       
   575                   subAspect: selectionHolder
       
   576                   aspect: selectedResultHolder
   571                 )
   577                 )
   572               )
   578               )
   573               createNewApplication: true
   579               createNewApplication: true
   574               createNewBuilder: true
   580               createNewBuilder: true
   575             )
   581             )
   576            )
   582            )
   577          
   583          
   578         )
   584         )
   579       )
   585       )
   580 
       
   581     "Modified: / 19-03-2010 / 08:32:34 / Jan Vrany <jan.vrany@fit.cvut.cz>"
       
   582 !
   586 !
   583 
   587 
   584 windowSpec
   588 windowSpec
   585     "This resource specification was automatically generated
   589     "This resource specification was automatically generated
   586      by the UIPainter of ST/X."
   590      by the UIPainter of ST/X."
   944 
   948 
   945     ^ 
   949     ^ 
   946      #(Menu
   950      #(Menu
   947         (
   951         (
   948          (MenuItem
   952          (MenuItem
   949             label: 'Select prerequisites'
   953             label: 'Select Prerequisites'
   950             itemValue: packageListMenuSelectPrerequisites
   954             itemValue: packageListMenuSelectPrerequisites
   951             translateLabel: true
   955             translateLabel: true
   952           )
   956           )
   953          (MenuItem
   957          (MenuItem
   954             label: 'Select prerequisites (recursive)'
   958             label: 'Select Prerequisites (recursive)'
   955             itemValue: packageListMenuSelectPrerequisitesAll
   959             itemValue: packageListMenuSelectPrerequisitesAll
   956             translateLabel: true
   960             translateLabel: true
   957           )
   961           )
   958          (MenuItem
   962          (MenuItem
   959             label: 'Select dependents'
   963             label: 'Select Dependents'
   960             itemValue: packageListMenuSelectDependents
   964             itemValue: packageListMenuSelectDependents
   961             translateLabel: true
   965             translateLabel: true
   962           )
   966           )
   963          (MenuItem
   967          (MenuItem
   964             label: 'Select dependents (recursively)'
   968             label: 'Select Dependents (recursively)'
   965             itemValue: packageListMenuSelectDependentsAll
   969             itemValue: packageListMenuSelectDependentsAll
   966             translateLabel: true
   970             translateLabel: true
   967           )
   971           )
   968          )
   972          )
   969         nil
   973         nil
   970         nil
   974         nil
   971       )
   975       )
   972 
   976 
   973     "Modified: / 06-06-2008 / 20:04:49 / Jan Vrany <vranyj1@fel.cvut.cz>"
   977     "Modified: / 06-06-2008 / 20:04:49 / Jan Vrany <vranyj1@fel.cvut.cz>"
       
   978     "Modified: / 23-09-2011 / 18:51:37 / cg"
       
   979 !
       
   980 
       
   981 resultListMenu
       
   982     "This resource specification was automatically generated
       
   983      by the MenuEditor of ST/X."
       
   984 
       
   985     "Do not manually edit this!! If it is corrupted,
       
   986      the MenuEditor may not be able to read the specification."
       
   987 
       
   988 
       
   989     "
       
   990      MenuEditor new openOnClass:Tools::TestRunner2 andSelector:#resultListMenu
       
   991      (Menu new fromLiteralArrayEncoding:(Tools::TestRunner2 resultListMenu)) startUp
       
   992     "
       
   993 
       
   994     <resource: #menu>
       
   995 
       
   996     ^ 
       
   997      #(Menu
       
   998         (
       
   999          (MenuItem
       
  1000             label: 'Browse'
       
  1001             itemValue: resultListMenuBrowse
       
  1002             translateLabel: true
       
  1003           )
       
  1004          )
       
  1005         nil
       
  1006         nil
       
  1007       )
   974 ! !
  1008 ! !
   975 
  1009 
   976 !TestRunner2 class methodsFor:'resources'!
  1010 !TestRunner2 class methodsFor:'resources'!
   977 
  1011 
   978 startSUnitIcon
  1012 startSUnitIcon
  1020 failedColor
  1054 failedColor
  1021     ^ self class failedColor
  1055     ^ self class failedColor
  1022 !
  1056 !
  1023 
  1057 
  1024 failureTestSuite
  1058 failureTestSuite
  1025 
       
  1026     | testSuite |
  1059     | testSuite |
       
  1060 
  1027     testSuite := TestSuite new.
  1061     testSuite := TestSuite new.
  1028     failureListHolder value do:
  1062     failureListHolder value do:[:test|
  1029         [:test|
  1063         testSuite addTest: test
  1030         testSuite addTest: test].
  1064     ].
  1031     ^testSuite
  1065     ^testSuite
  1032 
  1066 
  1033     "Created: / 06-06-2008 / 09:03:55 / Jan Vrany <vranyj1@fel.cvut.cz>"
  1067     "Created: / 06-06-2008 / 09:03:55 / Jan Vrany <vranyj1@fel.cvut.cz>"
       
  1068     "Modified (format): / 23-09-2011 / 18:56:52 / cg"
  1034 !
  1069 !
  1035 
  1070 
  1036 passedColor
  1071 passedColor
  1037     ^ self class passedColor
  1072     ^ self class passedColor
  1038 !
  1073 !
  1177 ! !
  1212 ! !
  1178 
  1213 
  1179 !TestRunner2 methodsFor:'accessing - menus'!
  1214 !TestRunner2 methodsFor:'accessing - menus'!
  1180 
  1215 
  1181 packageListMenu
  1216 packageListMenu
  1182 
  1217     ^ self class packageListMenu
  1183     ^self class packageListMenu
       
  1184 
  1218 
  1185     "Created: / 06-06-2008 / 19:16:28 / Jan Vrany <vranyj1@fel.cvut.cz>"
  1219     "Created: / 06-06-2008 / 19:16:28 / Jan Vrany <vranyj1@fel.cvut.cz>"
       
  1220     "Modified: / 23-09-2011 / 18:55:05 / cg"
       
  1221 !
       
  1222 
       
  1223 resultListMenu
       
  1224     ^ self class resultListMenu
       
  1225 
       
  1226     "Created: / 06-06-2008 / 19:16:28 / Jan Vrany <vranyj1@fel.cvut.cz>"
       
  1227     "Created: / 23-09-2011 / 18:53:46 / cg"
  1186 ! !
  1228 ! !
  1187 
  1229 
  1188 !TestRunner2 methodsFor:'actions'!
  1230 !TestRunner2 methodsFor:'actions'!
  1189 
  1231 
  1190 debugError: test
  1232 debugError: test
  1420     prjDef ifNil:[^self].
  1462     prjDef ifNil:[^self].
  1421     self selectedPackages:
  1463     self selectedPackages:
  1422         (prjDef allPreRequisites copy add: prjDef package; yourself)
  1464         (prjDef allPreRequisites copy add: prjDef package; yourself)
  1423 
  1465 
  1424     "Created: / 06-06-2008 / 20:11:22 / Jan Vrany <vranyj1@fel.cvut.cz>"
  1466     "Created: / 06-06-2008 / 20:11:22 / Jan Vrany <vranyj1@fel.cvut.cz>"
       
  1467 !
       
  1468 
       
  1469 resultListMenuBrowse
       
  1470     UserPreferences current systemBrowserClass 
       
  1471         openInClass: (self selectedTestSuite tests first class) selector:(self selectedResultHolder value test selector).
       
  1472 
       
  1473     "Created: / 23-09-2011 / 18:55:50 / cg"
  1425 ! !
  1474 ! !
  1426 
  1475 
  1427 !TestRunner2 methodsFor:'aspects'!
  1476 !TestRunner2 methodsFor:'aspects'!
  1428 
  1477 
  1429 classCategoryOrPackageTabIndexHolder
  1478 classCategoryOrPackageTabIndexHolder
  1594 
  1643 
  1595     resultHolder isNil ifTrue:[
  1644     resultHolder isNil ifTrue:[
  1596         resultHolder := ValueHolder new.
  1645         resultHolder := ValueHolder new.
  1597     ].
  1646     ].
  1598     ^ resultHolder
  1647     ^ resultHolder
       
  1648 !
       
  1649 
       
  1650 selectedResultHolder
       
  1651     selectedResultHolder isNil ifTrue:[
       
  1652         selectedResultHolder := ValueHolder new.
       
  1653     ].
       
  1654     ^ selectedResultHolder
       
  1655 
       
  1656     "Created: / 23-09-2011 / 19:14:51 / cg"
  1599 ! !
  1657 ! !
  1600 
  1658 
  1601 !TestRunner2 methodsFor:'displaying'!
  1659 !TestRunner2 methodsFor:'displaying'!
  1602 
  1660 
  1603 displayColor: aColorValue
  1661 displayColor: aColorValue
  1755 ! !
  1813 ! !
  1756 
  1814 
  1757 !TestRunner2::ClassList class methodsFor:'documentation'!
  1815 !TestRunner2::ClassList class methodsFor:'documentation'!
  1758 
  1816 
  1759 version
  1817 version
  1760     ^'$Id: Tools__TestRunner2.st,v 1.27 2011-08-21 16:06:11 cg Exp $'
  1818     ^'$Id: Tools__TestRunner2.st,v 1.28 2011-09-23 17:18:27 cg Exp $'
  1761 ! !
  1819 ! !
  1762 
  1820 
  1763 !TestRunner2::ClassList methodsFor:'private'!
  1821 !TestRunner2::ClassList methodsFor:'private'!
  1764 
  1822 
  1765 nameListEntryFor:aClass withNameSpace:useFullName
  1823 nameListEntryFor:aClass withNameSpace:useFullName
  1808           collection: (
  1866           collection: (
  1809            (HierarchicalListViewSpec
  1867            (HierarchicalListViewSpec
  1810               name: 'List'
  1868               name: 'List'
  1811               layout: (LayoutFrame 0 0 0 0 0 1 0 1)
  1869               layout: (LayoutFrame 0 0 0 0 0 1 0 1)
  1812               model: selectionHolder
  1870               model: selectionHolder
       
  1871               menu: resultListMenu
  1813               hasHorizontalScrollBar: true
  1872               hasHorizontalScrollBar: true
  1814               hasVerticalScrollBar: true
  1873               hasVerticalScrollBar: true
  1815               listModel: listHolder
  1874               listModel: listHolder
  1816               useIndex: false
  1875               useIndex: false
  1817               highlightMode: line
  1876               highlightMode: line
  1821             )
  1880             )
  1822            )
  1881            )
  1823          
  1882          
  1824         )
  1883         )
  1825       )
  1884       )
  1826 
       
  1827     "Modified: / 08-02-2010 / 10:08:09 / Jan Vrany <jan,vrany@fit.cvut.cz>"
       
  1828 ! !
  1885 ! !
  1829 
  1886 
  1830 !TestRunner2::ResultList class methodsFor:'plugIn spec'!
  1887 !TestRunner2::ResultList class methodsFor:'plugIn spec'!
  1831 
  1888 
  1832 aspectSelectors
  1889 aspectSelectors
  1843     ^ #(
  1900     ^ #(
  1844         #resultsHolder
  1901         #resultsHolder
  1845         #selectionHolder
  1902         #selectionHolder
  1846       ).
  1903       ).
  1847 
  1904 
  1848     "Modified: / 19-03-2010 / 08:32:10 / Jan Vrany <jan.vrany@fit.cvut.cz>"
       
  1849 ! !
  1905 ! !
  1850 
  1906 
  1851 !TestRunner2::ResultList methodsFor:'actions'!
  1907 !TestRunner2::ResultList methodsFor:'actions'!
  1852 
  1908 
  1853 debugTest:entryIndex 
  1909 debugTest:entryIndex 
  1917     ].
  1973     ].
  1918 
  1974 
  1919     "Created: / 19-03-2010 / 08:32:00 / Jan Vrany <jan.vrany@fit.cvut.cz>"
  1975     "Created: / 19-03-2010 / 08:32:00 / Jan Vrany <jan.vrany@fit.cvut.cz>"
  1920 !
  1976 !
  1921 
  1977 
  1922 selectiomHolder
  1978 selectionHolder
  1923     "return/create the 'selectiomHolder' value holder (automatically generated)"
  1979     selectionHolder isNil ifTrue:[
  1924 
  1980         selectionHolder := ValueHolder new.
  1925     selectiomHolder isNil ifTrue:[
  1981     ].
  1926         selectiomHolder := ValueHolder new.
  1982     ^ selectionHolder
  1927     ].
  1983 
  1928     ^ selectiomHolder
  1984     "Created: / 23-09-2011 / 19:01:57 / cg"
  1929 !
  1985 !
  1930 
  1986 
  1931 selectiomHolder:something
  1987 selectionHolder:something
  1932     "set the 'selectiomHolder' value holder (automatically generated)"
  1988     selectionHolder := something.
  1933 
  1989 
  1934     selectiomHolder := something.
  1990     "Created: / 23-09-2011 / 19:02:06 / cg"
  1935 ! !
  1991 ! !
  1936 
  1992 
  1937 !TestRunner2::ResultList methodsFor:'change & update'!
  1993 !TestRunner2::ResultList methodsFor:'change & update'!
  1938 
  1994 
  1939 update:aspect with:param from:sender
  1995 update:aspect with:param from:sender
  2254 ! !
  2310 ! !
  2255 
  2311 
  2256 !TestRunner2 class methodsFor:'documentation'!
  2312 !TestRunner2 class methodsFor:'documentation'!
  2257 
  2313 
  2258 version
  2314 version
  2259     ^ '$Header: /cvs/stx/stx/libtool/Tools__TestRunner2.st,v 1.27 2011-08-21 16:06:11 cg Exp $'
  2315     ^ '$Header: /cvs/stx/stx/libtool/Tools__TestRunner2.st,v 1.28 2011-09-23 17:18:27 cg Exp $'
  2260 !
  2316 !
  2261 
  2317 
  2262 version_CVS
  2318 version_CVS
  2263     ^ '$Header: /cvs/stx/stx/libtool/Tools__TestRunner2.st,v 1.27 2011-08-21 16:06:11 cg Exp $'
  2319     ^ '$Header: /cvs/stx/stx/libtool/Tools__TestRunner2.st,v 1.28 2011-09-23 17:18:27 cg Exp $'
  2264 !
  2320 !
  2265 
  2321 
  2266 version_SVN
  2322 version_SVN
  2267     ^ '§Id: Tools__TestRunner2.st 7486 2009-10-26 22:06:24Z vranyj1 §'
  2323     ^ '§Id: Tools__TestRunner2.st 7486 2009-10-26 22:06:24Z vranyj1 §'
  2268 ! !
  2324 ! !