Ticket #108: libtool_fix_3_of_3_rev_9ae4a3d621e0_Issue__108__Added_some_tests_for_issue__108.patch

File libtool_fix_3_of_3_rev_9ae4a3d621e0_Issue__108__Added_some_tests_for_issue__108.patch, 24.9 KB (added by jan vrany, 7 years ago)
  • new file tests/Make.proto

    # HG changeset patch
    # User Jan Vrany <jan.vrany@fit.cvut.cz>
    # Date 1508147369 -3600
    #      Mon Oct 16 10:49:29 2017 +0100
    # Branch jv
    # Node ID 9ae4a3d621e0b5985cb2729bf1ed338152cf8b8c
    # Parent  90d1d10f51ca6002576d4b5e0742b75e3c6143c4
    Issue #108: Added some tests for issue #108
    
    See https://swing.fit.cvut.cz/projects/stx-jv/ticket/108
    
    diff -r 90d1d10f51ca -r 9ae4a3d621e0 tests/Make.proto
    - +  
     1# $Header$
     2#
     3# DO NOT EDIT
     4# automagically generated from the projectDefinition: stx_libtool_tests.
     5#
     6# Warning: once you modify this file, do not rerun
     7# stmkmp or projectDefinition-build again - otherwise, your changes are lost.
     8#
     9# The Makefile as generated by this Make.proto supports the following targets:
     10#    make         - compile all st-files to a classLib
     11#    make clean   - clean all temp files
     12#    make clobber - clean all
     13#
     14# This file contains definitions for Unix based platforms.
     15# It shares common definitions with the win32-make in Make.spec.
     16
     17#
     18# position (of this package) in directory hierarchy:
     19# (must point to ST/X top directory, for tools and includes)
     20TOP=../..
     21INCLUDE_TOP=$(TOP)/..
     22
     23# subdirectories where targets are to be made:
     24SUBDIRS=
     25
     26
     27# subdirectories where Makefiles are to be made:
     28# (only define if different from SUBDIRS)
     29# ALLSUBDIRS=
     30
     31REQUIRED_SUPPORT_DIRS=
     32
     33# if your embedded C code requires any system includes,
     34# add the path(es) here:,
     35# ********** OPTIONAL: MODIFY the next lines ***
     36# LOCALINCLUDES=-Ifoo -Ibar
     37LOCALINCLUDES= -I$(INCLUDE_TOP)/stx/goodies/sunit -I$(INCLUDE_TOP)/stx/libbasic -I$(INCLUDE_TOP)/stx/libbasic3 -I$(INCLUDE_TOP)/stx/libtool -I$(INCLUDE_TOP)/stx/libview
     38
     39
     40# if you need any additional defines for embedded C code,
     41# add them here:,
     42# ********** OPTIONAL: MODIFY the next lines ***
     43# LOCALDEFINES=-Dfoo -Dbar -DDEBUG
     44LOCALDEFINES=
     45
     46LIBNAME=libstx_libtool_tests
     47STCLOCALOPT='-package=$(PACKAGE)' -I. $(LOCALINCLUDES) $(STCLOCALOPTIMIZATIONS) $(STCWARNINGS) $(LOCALDEFINES) -headerDir=.  -varPrefix=$(LIBNAME)
     48
     49
     50# ********** OPTIONAL: MODIFY the next line ***
     51# additional C-libraries that should be pre-linked with the class-objects
     52LD_OBJ_LIBS=
     53LOCAL_SHARED_LIBS=
     54
     55
     56# ********** OPTIONAL: MODIFY the next line ***
     57# additional C targets or libraries should be added below
     58LOCAL_EXTRA_TARGETS=
     59
     60OBJS= $(COMMON_OBJS) $(UNIX_OBJS)
     61
     62
     63
     64all:: preMake classLibRule postMake
     65
     66pre_objs:: 
     67
     68
     69
     70
     71
     72
     73# Enforce recompilation of package definition class if Mercurial working
     74# copy state changes. Together with --guessVersion it ensures that package
     75# definition class always contains correct binary revision string.
     76ifneq (**NOHG**, $(shell hg root 2> /dev/null || echo -n '**NOHG**'))
     77stx_libtool_tests.$(O): $(shell hg root)/.hg/dirstate
     78endif
     79
     80
     81
     82
     83# run default testsuite for this package
     84test: $(TOP)/goodies/builder/reports
     85        $(MAKE) -C $(TOP)/goodies/builder/reports -f Makefile.init
     86        $(TOP)/goodies/builder/reports/report-runner.sh -D . -r Builder::TestReport -p $(PACKAGE)
     87
     88
     89
     90# add more install actions here
     91install::
     92
     93# add more install actions for aux-files (resources) here
     94installAux::
     95
     96# add more preMake actions here
     97preMake::
     98
     99# add more postMake actions here
     100postMake:: cleanjunk
     101
     102# build all mandatory prerequisite packages (containing superclasses) for this package
     103prereq:
     104        cd ../../libbasic && $(MAKE) "CFLAGS_LOCAL=$(GLOBALDEFINES) "
     105        cd ../../libbasic2 && $(MAKE) "CFLAGS_LOCAL=$(GLOBALDEFINES) "
     106        cd ../../libview && $(MAKE) "CFLAGS_LOCAL=$(GLOBALDEFINES) "
     107        cd ../../libview2 && $(MAKE) "CFLAGS_LOCAL=$(GLOBALDEFINES) "
     108        cd ../../goodies/sunit && $(MAKE) "CFLAGS_LOCAL=$(GLOBALDEFINES) "
     109
     110
     111
     112# build all packages containing referenced classes for this package
     113# they are not needed to compile the package (but later, to load it)
     114references:
     115
     116
     117cleanjunk::
     118        -rm -f *.s *.s2
     119
     120clean::
     121        -rm -f *.o *.H
     122
     123clobber:: clean
     124        -rm -f *.so *.dll
     125
     126
     127# BEGINMAKEDEPEND --- do not remove this line; make depend needs it
     128$(OUTDIR)Tools__NewSystemBrowserTests.$(O) Tools__NewSystemBrowserTests.$(C) Tools__NewSystemBrowserTests.$(H): Tools__NewSystemBrowserTests.st $(INCLUDE_TOP)/stx/goodies/sunit/TestAsserter.$(H) $(INCLUDE_TOP)/stx/goodies/sunit/TestCase.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
     129$(OUTDIR)stx_libtool_tests.$(O) stx_libtool_tests.$(C) stx_libtool_tests.$(H): stx_libtool_tests.st $(INCLUDE_TOP)/stx/libbasic/LibraryDefinition.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libbasic/ProjectDefinition.$(H) $(STCHDR)
     130
     131# ENDMAKEDEPEND --- do not remove this line
     132
  • new file tests/Make.spec

    diff -r 90d1d10f51ca -r 9ae4a3d621e0 tests/Make.spec
    - +  
     1# $Header$
     2#
     3# DO NOT EDIT
     4# automagically generated from the projectDefinition: stx_libtool_tests.
     5#
     6# Warning: once you modify this file, do not rerun
     7# stmkmp or projectDefinition-build again - otherwise, your changes are lost.
     8#
     9# This file contains specifications which are common to all platforms.
     10#
     11
     12# Do NOT CHANGE THESE DEFINITIONS
     13# (otherwise, ST/X will have a hard time to find out the packages location from its packageID,
     14#  to find the source code of a class and to find the library for a package)
     15MODULE=stx
     16MODULE_DIR=libtool/tests
     17PACKAGE=$(MODULE):$(MODULE_DIR)
     18
     19
     20# Argument(s) to the stc compiler (stc --usage).
     21#  -headerDir=. : create header files locally
     22#                (if removed, they will be created as common
     23#  -Pxxx       : defines the package
     24#  -Zxxx       : a prefix for variables within the classLib
     25#  -Dxxx       : defines passed to CC for inline C-code
     26#  -Ixxx       : include path passed to CC for inline C-code
     27#  +optspace   : optimized for space
     28#  +optspace2  : optimized more for space
     29#  +optspace3  : optimized even more for space
     30#  +optinline  : generate inline code for some ST constructs
     31#  +inlineNew  : additionally inline new
     32#  +inlineMath : additionally inline some floatPnt math stuff
     33#
     34# ********** OPTIONAL: MODIFY the next line(s) ***
     35# STCLOCALOPTIMIZATIONS=+optinline +inlineNew
     36# STCLOCALOPTIMIZATIONS=+optspace3
     37STCLOCALOPTIMIZATIONS=+optspace3
     38
     39
     40# Argument(s) to the stc compiler (stc --usage).
     41#  -warn            : no warnings
     42#  -warnNonStandard : no warnings about ST/X extensions
     43#  -warnEOLComments : no warnings about EOL comment extension
     44#  -warnPrivacy     : no warnings about privateClass extension
     45#  -warnUnused      : no warnings about unused variables
     46#
     47# ********** OPTIONAL: MODIFY the next line(s) ***
     48# STCWARNINGS=-warn
     49# STCWARNINGS=-warnNonStandard
     50# STCWARNINGS=-warnEOLComments
     51STCWARNINGS=-warnNonStandard
     52
     53COMMON_CLASSES= \
     54        Tools::NewSystemBrowserTests \
     55        stx_libtool_tests \
     56
     57
     58
     59
     60COMMON_OBJS= \
     61    $(OUTDIR)Tools__NewSystemBrowserTests.$(O) \
     62    $(OUTDIR)stx_libtool_tests.$(O) \
     63
     64
     65
  • new file tests/Makefile.init

    diff -r 90d1d10f51ca -r 9ae4a3d621e0 tests/Makefile.init
    - +  
     1#
     2# DO NOT EDIT
     3#
     4# make uses this file (Makefile) only, if there is no
     5# file named "makefile" (lower-case m) in the same directory.
     6# My only task is to generate the real makefile and call make again.
     7# Thereafter, I am no longer used and needed.
     8#
     9# MACOSX caveat:
     10#   as filenames are not case sensitive (in a default setup),
     11#   we cannot use the above trick. Therefore, this file is now named
     12#   "Makefile.init", and you have to execute "make -f Makefile.init" to
     13#   get the initial makefile.  This is now also done by the toplevel CONFIG
     14#   script.
     15
     16.PHONY: run
     17
     18run: makefile
     19        $(MAKE) -f makefile
     20
     21#only needed for the definition of $(TOP)
     22include Make.proto
     23
     24makefile: mf
     25
     26mf:
     27        $(TOP)/rules/stmkmf
  • new file tests/Tools__NewSystemBrowserTests.st

    diff -r 90d1d10f51ca -r 9ae4a3d621e0 tests/Tools__NewSystemBrowserTests.st
    - +  
     1"{ Package: 'stx:libtool/tests' }"
     2
     3"{ NameSpace: Tools }"
     4
     5TestCase subclass:#NewSystemBrowserTests
     6        instanceVariableNames:'browser browserInteractor'
     7        classVariableNames:''
     8        poolDictionaries:''
     9        category:'Interface-Browsers-New-Tests'
     10!
     11
     12!NewSystemBrowserTests methodsFor:'mocks'!
     13
     14foo
     15    ^ 1
     16
     17    "Created: / 07-08-2017 / 16:07:36 / Jan Vrany <jan.vrany@fit.cvut.cz>"
     18! !
     19
     20!NewSystemBrowserTests methodsFor:'running'!
     21
     22setUp
     23    Screen current isNil ifTrue:[
     24        Smalltalk openDisplay.
     25    ].
     26    self skipIf:Screen current isNil description:'No display connection'.
     27    Smalltalk loadPackage:'stx:goodies/sunit/ext/ui'.
     28    super setUp.
     29
     30    browser := Tools::NewSystemBrowser new.
     31    browser open.
     32    browserInteractor := browser interactor.
     33    MessageTracer untraceMethod: (self class >> #foo)
     34
     35    "Add your own code here..."
     36
     37    "Modified: / 15-10-2017 / 21:54:46 / Jan Vrany <jan.vrany@fit.cvut.cz>"
     38!
     39
     40tearDown
     41    browser closeDownViews.
     42    browser := browserInteractor := nil.
     43    MessageTracer untraceMethod: (self class >> #foo)
     44
     45
     46    "Add your own code here..."
     47
     48    "Created: / 07-08-2017 / 16:25:43 / Jan Vrany <jan.vrany@fit.cvut.cz>"
     49! !
     50
     51!NewSystemBrowserTests methodsFor:'tests'!
     52
     53test_issue_108_a
     54
     55    self assert: (self class >> #foo) mclass == self class.
     56    self assert: (self class >> #foo) isWrapped not.
     57
     58    browserInteractor do:[ browser switchToClass: self class selector: #foo ].
     59    self assert: browser theSingleSelectedMethod == (self class >> #foo).
     60    "
     61    browser selectedMethods onChangeEvaluate: [ self halt ]
     62    "
     63    browserInteractor do:[ browser  debugMenuTrace ].
     64    self assert: (self class >> #foo) == (browser theSingleSelectedMethod).
     65    self assert: (self class >> #foo) mclass == self class.
     66    self assert: (self class >> #foo) isWrapped.
     67    self assert: (self class >> #foo) originalMethod isWrapped not.
     68
     69    browserInteractor do:[ browser  debugMenuTraceSender ].
     70    self assert: (self class >> #foo) == (browser theSingleSelectedMethod).
     71    self assert: (self class >> #foo) mclass == self class.
     72    self assert: (self class >> #foo) isWrapped.
     73    self assert: (self class >> #foo) originalMethod isWrapped not.
     74
     75    browserInteractor do:[ browser  debugMenuRemoveBreakOrTrace ].
     76    self assert: (self class >> #foo) == (browser theSingleSelectedMethod).
     77    self assert: (self class >> #foo) mclass == self class.
     78    self assert: (self class >> #foo) isWrapped not.
     79
     80    "Created: / 07-08-2017 / 16:07:19 / Jan Vrany <jan.vrany@fit.cvut.cz>"
     81    "Modified: / 15-10-2017 / 23:25:15 / Jan Vrany <jan.vrany@fit.cvut.cz>"
     82!
     83
     84test_issue_108_b
     85
     86    self assert: (self class >> #foo) mclass == self class.
     87    self assert: (self class >> #foo) isWrapped not.
     88
     89    browserInteractor do:[ browser switchToClass: self class selector: #foo ].
     90    self assert: browser theSingleSelectedMethod == (self class >> #foo).
     91    "
     92    browser selectedMethods onChangeEvaluate: [ self halt ]
     93    (browser builder findComponentAt:#MethodList) application selectedMethodNameIndices onChangeEvaluate: [ self halt ].
     94    "
     95    browserInteractor do:[ browser  debugMenuBreakPoint ].
     96    self assert: (self class >> #foo) == (browser theSingleSelectedMethod).
     97    self assert: (self class >> #foo) mclass == self class.
     98    self assert: (self class >> #foo) isWrapped.
     99    self assert: (self class >> #foo) originalMethod isWrapped not.
     100
     101    browserInteractor do:[ browser  debugMenuRemoveBreakOrTrace ].
     102    self assert: (self class >> #foo) == (browser theSingleSelectedMethod).
     103    self assert: (self class >> #foo) mclass == self class.
     104    self assert: (self class >> #foo) isWrapped not.
     105
     106    "Created: / 15-10-2017 / 22:30:53 / Jan Vrany <jan.vrany@fit.cvut.cz>"
     107! !
     108
  • new file tests/abbrev.stc

    diff -r 90d1d10f51ca -r 9ae4a3d621e0 tests/abbrev.stc
    - +  
     1# automagically generated by the project definition
     2# this file is needed for stc to be able to compile modules independently.
     3# it provides information about a classes filename, category and especially namespace.
     4Tools::NewSystemBrowserTests Tools__NewSystemBrowserTests stx:libtool/tests 'Interface-Browsers-New-Tests' 1
     5stx_libtool_tests stx_libtool_tests stx:libtool/tests '* Projects & Packages *' 3
  • new file tests/bc.mak

    diff -r 90d1d10f51ca -r 9ae4a3d621e0 tests/bc.mak
    - +  
     1# $Header$
     2#
     3# DO NOT EDIT
     4# automagically generated from the projectDefinition: stx_libtool_tests.
     5#
     6# Warning: once you modify this file, do not rerun
     7# stmkmp or projectDefinition-build again - otherwise, your changes are lost.
     8#
     9# Notice, that the name bc.mak is historical (from times, when only borland c was supported).
     10# This file contains make rules for the win32 platform using either borland-bcc or visual-c.
     11# It shares common definitions with the unix-make in Make.spec.
     12# The bc.mak supports the following targets:
     13#    bmake         - compile all st-files to a classLib (dll)
     14#    bmake clean   - clean all temp files
     15#    bmake clobber - clean all
     16#
     17# Historic Note:
     18#  this used to contain only rules to make with borland
     19#    (called via bmake, by "make.exe -f bc.mak")
     20#  this has changed; it is now also possible to build using microsoft visual c
     21#    (called via vcmake, by "make.exe -f bc.mak -DUSEVC")
     22#
     23TOP=..\..
     24INCLUDE_TOP=$(TOP)\..
     25
     26
     27
     28!INCLUDE $(TOP)\rules\stdHeader_bc
     29
     30!INCLUDE Make.spec
     31
     32LIBNAME=libstx_libtool_tests
     33MODULE_PATH=libtool\tests
     34RESFILES=stx_libtool_testsWINrc.$(RES)
     35
     36
     37
     38LOCALINCLUDES= -I$(INCLUDE_TOP)\stx\goodies\sunit -I$(INCLUDE_TOP)\stx\libbasic -I$(INCLUDE_TOP)\stx\libbasic3 -I$(INCLUDE_TOP)\stx\libtool -I$(INCLUDE_TOP)\stx\libview
     39LOCALDEFINES=
     40
     41STCLOCALOPT=-package=$(PACKAGE) -I. $(LOCALINCLUDES) -headerDir=. $(STCLOCALOPTIMIZATIONS) $(STCWARNINGS) $(LOCALDEFINES)  -varPrefix=$(LIBNAME)
     42LOCALLIBS=
     43
     44OBJS= $(COMMON_OBJS) $(WIN32_OBJS)
     45
     46ALL::  classLibRule
     47
     48classLibRule: $(OUTDIR) $(OUTDIR)$(LIBNAME).dll
     49
     50!INCLUDE $(TOP)\rules\stdRules_bc
     51
     52# build all mandatory prerequisite packages (containing superclasses) for this package
     53prereq:
     54        pushd ..\..\libbasic & $(MAKE_BAT) "CFLAGS_LOCAL=$(GLOBALDEFINES) "
     55        pushd ..\..\libbasic2 & $(MAKE_BAT) "CFLAGS_LOCAL=$(GLOBALDEFINES) "
     56        pushd ..\..\libview & $(MAKE_BAT) "CFLAGS_LOCAL=$(GLOBALDEFINES) "
     57        pushd ..\..\libview2 & $(MAKE_BAT) "CFLAGS_LOCAL=$(GLOBALDEFINES) "
     58        pushd ..\..\goodies\sunit & $(MAKE_BAT) "CFLAGS_LOCAL=$(GLOBALDEFINES) "
     59
     60
     61
     62
     63
     64
     65
     66test: $(TOP)\goodies\builder\reports\NUL
     67        pushd $(TOP)\goodies\builder\reports & $(MAKE_BAT)
     68        $(TOP)\goodies\builder\reports\report-runner.bat -D . -r Builder::TestReport -p $(PACKAGE)
     69       
     70clean::
     71        -del *.$(CSUFFIX)
     72
     73
     74# BEGINMAKEDEPEND --- do not remove this line; make depend needs it
     75$(OUTDIR)Tools__NewSystemBrowserTests.$(O) Tools__NewSystemBrowserTests.$(C) Tools__NewSystemBrowserTests.$(H): Tools__NewSystemBrowserTests.st $(INCLUDE_TOP)\stx\goodies\sunit\TestAsserter.$(H) $(INCLUDE_TOP)\stx\goodies\sunit\TestCase.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
     76$(OUTDIR)stx_libtool_tests.$(O) stx_libtool_tests.$(C) stx_libtool_tests.$(H): stx_libtool_tests.st $(INCLUDE_TOP)\stx\libbasic\LibraryDefinition.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libbasic\ProjectDefinition.$(H) $(STCHDR)
     77
     78# ENDMAKEDEPEND --- do not remove this line
     79
     80# **Must be at end**
     81
     82# Enforce recompilation of package definition class if Mercurial working
     83# copy state changes. Together with --guessVersion it ensures that package
     84# definition class always contains correct binary revision string.
     85!IFDEF HGROOT
     86$(OUTDIR)stx_libtool_tests.$(O): $(HGROOT)\.hg\dirstate
     87!ENDIF
  • new file tests/bmake.bat

    diff -r 90d1d10f51ca -r 9ae4a3d621e0 tests/bmake.bat
    - +  
     1@REM -------
     2@REM make using Borland bcc32
     3@REM type bmake, and wait...
     4@REM do not edit - automatically generated from ProjectDefinition
     5@REM -------
     6@SET DEFINES=
     7@REM Kludge got Mercurial, cannot be implemented in Borland make
     8@FOR /F "tokens=*" %%i in ('hg root') do SET HGROOT=%%i
     9@IF "%HGROOT%" NEQ "" SET DEFINES=%DEFINES% "-DHGROOT=%HGROOT%"
     10
     11make.exe -N -f bc.mak  %DEFINES% %*
     12
     13
     14
     15
  • new file tests/libInit.cc

    diff -r 90d1d10f51ca -r 9ae4a3d621e0 tests/libInit.cc
    - +  
     1/*
     2 * $Header$
     3 *
     4 * DO NOT EDIT
     5 * automagically generated from the projectDefinition: stx_libtool_tests.
     6 */
     7#define __INDIRECTVMINITCALLS__
     8#include <stc.h>
     9
     10#ifdef WIN32
     11# pragma codeseg INITCODE "INITCODE"
     12#endif
     13
     14#if defined(INIT_TEXT_SECTION) || defined(DLL_EXPORT)
     15DLL_EXPORT void _libstx_libtool_tests_Init() INIT_TEXT_SECTION;
     16DLL_EXPORT void _libstx_libtool_tests_InitDefinition() INIT_TEXT_SECTION;
     17#endif
     18
     19extern void _Tools__NewSystemBrowserTests_Init(int pass, struct __vmData__ *__pRT__, OBJ snd);
     20extern void _stx_137libtool_137tests_Init(int pass, struct __vmData__ *__pRT__, OBJ snd);
     21
     22
     23
     24void _libstx_libtool_tests_InitDefinition(int pass, struct __vmData__ *__pRT__, OBJ snd)
     25{
     26  __BEGIN_PACKAGE2__("libstx_libtool_tests__DFN", _libstx_libtool_tests_InitDefinition, "stx:libtool/tests");
     27    _stx_137libtool_137tests_Init(pass,__pRT__,snd);
     28
     29  __END_PACKAGE__();
     30}
     31
     32void _libstx_libtool_tests_Init(int pass, struct __vmData__ *__pRT__, OBJ snd)
     33{
     34  __BEGIN_PACKAGE2__("libstx_libtool_tests", _libstx_libtool_tests_Init, "stx:libtool/tests");
     35    _Tools__NewSystemBrowserTests_Init(pass,__pRT__,snd);
     36    _stx_137libtool_137tests_Init(pass,__pRT__,snd);
     37
     38
     39  __END_PACKAGE__();
     40}
  • new file tests/mingwmake.bat

    diff -r 90d1d10f51ca -r 9ae4a3d621e0 tests/mingwmake.bat
    - +  
     1@REM -------
     2@REM make using mingw gnu compiler
     3@REM type mingwmake, and wait...
     4@REM do not edit - automatically generated from ProjectDefinition
     5@REM -------
     6@SET DEFINES=
     7@REM Kludge got Mercurial, cannot be implemented in Borland make
     8@FOR /F "tokens=*" %%i in ('hg root') do SET HGROOT=%%i
     9@IF "%HGROOT%" NEQ "" SET DEFINES=%DEFINES% "-DHGROOT=%HGROOT%"
     10
     11@pushd ..\..\rules
     12@call find_mingw.bat
     13@popd
     14make.exe -N -f bc.mak %DEFINES% %USEMINGW_ARG% %*
     15
     16
     17
     18
  • new file tests/stx_libtool_tests.st

    diff -r 90d1d10f51ca -r 9ae4a3d621e0 tests/stx_libtool_tests.st
    - +  
     1"{ Package: 'stx:libtool/tests' }"
     2
     3"{ NameSpace: Smalltalk }"
     4
     5LibraryDefinition subclass:#stx_libtool_tests
     6        instanceVariableNames:''
     7        classVariableNames:''
     8        poolDictionaries:''
     9        category:'* Projects & Packages *'
     10!
     11
     12
     13!stx_libtool_tests class methodsFor:'description'!
     14
     15excludedFromPreRequisites
     16    "obsolete; temporarily, this is still called for, but will eventually vanish.
     17   
     18     List packages which are to be explicitely excluded from the automatic constructed
     19     prerequisites lists (both).
     20     If empty, everything that is found along the inheritance of any of
     21     my classes is considered to be a prerequisite package."
     22
     23    ^ #(
     24    )
     25!
     26
     27mandatoryPreRequisites
     28    "list packages which are mandatory as a prerequisite.
     29     This are packages containing superclasses of my classes and classes which
     30     are extended by myself.
     31     They are mandatory, because we need these packages as a prerequisite for loading and compiling.
     32     This method is generated automatically,
     33     by searching along the inheritance chain of all of my classes.
     34     Please take a look at the #referencedPreRequisites method as well."
     35
     36    ^ #(
     37        #'stx:goodies/sunit'    "TestAsserter - superclass of Tools::NewSystemBrowserTests"
     38        #'stx:libbasic'    "LibraryDefinition - superclass of stx_libtool_tests"
     39    )
     40!
     41
     42referencedPreRequisites
     43    "list packages which are a prerequisite, because they contain
     44     classes which are referenced by my classes.
     45     These packages are NOT needed as a prerequisite for compiling or loading,
     46     however, a class from it may be referenced during execution and having it
     47     unloaded then may lead to a runtime doesNotUnderstand error, unless the caller
     48     includes explicit checks for the package being present.
     49     This method is generated automatically,
     50     by searching all classes (and their packages) which are referenced by my classes.
     51     Please also take a look at the #mandatoryPreRequisites method"
     52
     53    ^ #(
     54        #'stx:libbasic3'    "MessageTracer - referenced by Tools::NewSystemBrowserTests>>setUp"
     55        #'stx:libtool'    "Tools::NewSystemBrowser - referenced by Tools::NewSystemBrowserTests>>setUp"
     56        #'stx:libview'    "Color - referenced by Tools::NewSystemBrowserTests>>setUp"
     57    )
     58!
     59
     60subProjects
     61    "list packages which are known as subprojects.
     62     The generated makefile will enter those and make there as well.
     63     However: they are not forced to be loaded when a package is loaded;
     64     for those, redefine #referencedPrerequisites or #mandatoryPreRequisites."
     65
     66    ^ #(
     67    )
     68! !
     69
     70!stx_libtool_tests class methodsFor:'description - contents'!
     71
     72classNamesAndAttributes
     73    "lists the classes which are to be included in the project.
     74     Each entry in the list may be: a single class-name (symbol),
     75     or an array-literal consisting of class name and attributes.
     76     Attributes are: #autoload or #<os> where os is one of win32, unix,..."
     77
     78    ^ #(
     79        "<className> or (<className> attributes...) in load order"
     80        #'Tools::NewSystemBrowserTests'
     81        #'stx_libtool_tests'
     82    )
     83!
     84
     85extensionMethodNames
     86    "lists the extension methods which are to be included in the project.
     87     Entries are 2-element array literals, consisting of class-name and selector.
     88     A correponding method with real names must be present in my concrete subclasses
     89     if it has extensions."
     90
     91    ^ #(
     92    )
     93! !
     94
     95!stx_libtool_tests class methodsFor:'description - project information'!
     96
     97companyName
     98    "Returns a company string which will appear in <lib>.rc.
     99     Under win32, this is placed into the dll's file-info.
     100     Other systems may put it elsewhere, or ignore it."
     101
     102    ^ 'Claus Gittinger & eXept Software AG'
     103!
     104
     105description
     106    "Returns a description string which will appear in nt.def / bc.def"
     107
     108    ^ 'Smalltalk/X Class library'
     109!
     110
     111legalCopyright
     112    "Returns a copyright string which will appear in <lib>.rc.
     113     Under win32, this is placed into the dll's file-info.
     114     Other systems may put it elsewhere, or ignore it."
     115
     116    ^ 'Copyright Claus Gittinger 2017\nCopyright eXept Software AG 2017'
     117!
     118
     119productName
     120    "Returns a product name which will appear in <lib>.rc.
     121     Under win32, this is placed into the dll's file-info.
     122     This method is usually redefined in a concrete application definition"
     123
     124    ^ 'Smalltalk/X'
     125! !
     126
     127!stx_libtool_tests class methodsFor:'documentation'!
     128
     129version_HG
     130    ^ '$Changeset: <not expanded> $'
     131! !
     132
  • new file tests/stx_libtool_testsWINrc.rc

    diff -r 90d1d10f51ca -r 9ae4a3d621e0 tests/stx_libtool_testsWINrc.rc
    - +  
     1//
     2// DO NOT EDIT
     3// automagically generated from the projectDefinition: stx_libtool_tests.
     4//
     5VS_VERSION_INFO VERSIONINFO
     6  FILEVERSION     8,0,32767,32767
     7  PRODUCTVERSION  8,0,0,0
     8#if (__BORLANDC__)
     9  FILEFLAGSMASK   VS_FF_DEBUG | VS_FF_PRERELEASE
     10  FILEFLAGS       VS_FF_PRERELEASE | VS_FF_SPECIALBUILD
     11  FILEOS          VOS_NT_WINDOWS32
     12  FILETYPE        VFT_DLL
     13  FILESUBTYPE     VS_USER_DEFINED
     14#endif
     15
     16BEGIN
     17  BLOCK "StringFileInfo"
     18  BEGIN
     19    BLOCK "040904E4"
     20    BEGIN
     21      VALUE "CompanyName", "Claus Gittinger & eXept Software AG\0"
     22      VALUE "FileDescription", "Smalltalk/X Class library (LIB)\0"
     23      VALUE "FileVersion", "8.0.32767.32767\0"
     24      VALUE "InternalName", "stx:libtool/tests\0"
     25      VALUE "LegalCopyright", "Copyright Claus Gittinger 2017\nCopyright eXept Software AG 2017\0"
     26      VALUE "ProductName", "Smalltalk/X\0"
     27      VALUE "ProductVersion", "8.0.0.0\0"
     28      VALUE "ProductDate", "Mon, 16 Oct 2017 09:48:00 GMT\0"
     29    END
     30
     31  END
     32
     33  BLOCK "VarFileInfo"
     34  BEGIN                               //  Language   |    Translation
     35    VALUE "Translation", 0x409, 0x4E4 // U.S. English, Windows Multilingual
     36  END
     37END
  • new file tests/vcmake.bat

    diff -r 90d1d10f51ca -r 9ae4a3d621e0 tests/vcmake.bat
    - +  
     1@REM -------
     2@REM make using Microsoft Visual C compiler
     3@REM type vcmake, and wait...
     4@REM do not edit - automatically generated from ProjectDefinition
     5@REM -------
     6
     7@if not defined VSINSTALLDIR (
     8    pushd ..\..\rules
     9    call vcsetup.bat
     10    popd
     11)
     12@SET DEFINES=
     13@REM Kludge got Mercurial, cannot be implemented in Borland make
     14@FOR /F "tokens=*" %%i in ('hg root') do SET HGROOT=%%i
     15@IF "%HGROOT%" NEQ "" SET DEFINES=%DEFINES% "-DHGROOT=%HGROOT%"
     16
     17
     18make.exe -N -f bc.mak -DUSEVC=1 %DEFINES% %*
     19
     20
     21
     22