Ticket #99: libtool_fix_1_of_2_rev_091022874048_Issue_99__Added_tests_catching_issue_99.patch

File libtool_fix_1_of_2_rev_091022874048_Issue_99__Added_tests_catching_issue_99.patch, 27.2 KB (added by jan vrany, 8 years ago)
  • new file tests/Make.proto

    # HG changeset patch
    # User Jan Vrany <jan.vrany@fit.cvut.cz>
    # Date 1468915101 -3600
    #      Tue Jul 19 08:58:21 2016 +0100
    # Branch jv
    # Node ID 09102287404837d2409733346d47e59a4fe8f968
    # Parent  8b6e7ef9a974175f89f003f7c71ecb1ed8801a92
    Issue 99: Added tests catching issue 99
    
    https://swing.fit.cvut.cz/projects/stx-jv/ticket/99
    
    diff -r 8b6e7ef9a974 -r 091022874048 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/libtool
     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)WorkspaceApplicationTests.$(O) WorkspaceApplicationTests.$(C) WorkspaceApplicationTests.$(H): WorkspaceApplicationTests.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 8b6e7ef9a974 -r 091022874048 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        WorkspaceApplicationTests \
     55        stx_libtool_tests \
     56
     57
     58
     59
     60COMMON_OBJS= \
     61    $(OUTDIR_SLASH)WorkspaceApplicationTests.$(O) \
     62    $(OUTDIR_SLASH)stx_libtool_tests.$(O) \
     63
     64
     65
  • new file tests/Makefile.init

    diff -r 8b6e7ef9a974 -r 091022874048 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/WorkspaceApplicationTests.st

    diff -r 8b6e7ef9a974 -r 091022874048 tests/WorkspaceApplicationTests.st
    - +  
     1"{ Package: 'stx:libtool/tests' }"
     2
     3"{ NameSpace: Smalltalk }"
     4
     5TestCase subclass:#WorkspaceApplicationTests
     6        instanceVariableNames:'ws'
     7        classVariableNames:''
     8        poolDictionaries:''
     9        category:'Interface-Smalltalk-Tests'
     10!
     11
     12
     13!WorkspaceApplicationTests methodsFor:'running'!
     14
     15setUp
     16    super setUp.
     17    self assert: (Smalltalk loadPackage: 'stx:goodies/sunit/ext/ui').
     18    Display isNil ifTrue:[Smalltalk openDisplay].
     19    self skipIf: Display isNil description:'No connection to display (running headless?)'.
     20    ws := WorkspaceApplication new.
     21    ws open.
     22    ws window waitUntilVisible
     23
     24    "Created: / 20-05-2014 / 12:40:54 / Jan Vrany <jan.vrany@fit.cvut.cz>"
     25    "Modified: / 19-07-2016 / 08:29:37 / Jan Vrany <jan.vrany@fit.cvut.cz>"
     26!
     27
     28tearDown
     29    ws notNil ifTrue:[
     30        ws closeDownViews.
     31    ].
     32    ws := nil.
     33
     34    "Created: / 20-05-2014 / 12:41:12 / Jan Vrany <jan.vrany@fit.cvut.cz>"
     35! !
     36
     37!WorkspaceApplicationTests methodsFor:'tests'!
     38
     39test_issue_99_load_from_file_01
     40    "
     41    Test if content loaded from file is gets highligted.
     42
     43    https://swing.fit.cvut.cz/projects/stx-jv/ticket/99
     44    "
     45
     46    | tw file |
     47
     48    tw := (ws interactor / 'MainView' / 'NoteBook' / 'Tools::CodeView2' / 'HVScrollableView' / 'Tools::CodeView2::TextView').
     49    file := Filename newTemporary.
     50    [
     51        file writingFileDo:[:f| f nextPutLine: '''self'' halt' ].
     52        tw do:[
     53            ws loadFile: file pathName.
     54            self assert: tw contents = ('''self'' halt' , Character cr).
     55        ].
     56        tw wait.
     57        "/ Nasty, but we have to wait until background job finishes...
     58        Delay waitForMilliseconds: 200.
     59        self assert: ((tw list first emphasisAt: 3) includes: UserPreferences current stringEmphasis).
     60        self assert: ((tw list first emphasisAt: 3) includes: #color -> UserPreferences current stringColor).
     61
     62
     63
     64    ] ensure:[
     65        file remove
     66    ].
     67
     68    "Created: / 18-07-2016 / 19:00:32 / Jan Vrany <jan.vrany@fit.cvut.cz>"
     69    "Modified: / 19-07-2016 / 08:29:17 / Jan Vrany <jan.vrany@fit.cvut.cz>"
     70!
     71
     72test_issue_99_paste_01
     73    "
     74    Test if contents gets re-highlightes after a paste
     75
     76    https://swing.fit.cvut.cz/projects/stx-jv/ticket/99
     77    "
     78
     79    | tw |
     80
     81    tw := (ws interactor / 'MainView' / 'NoteBook' / 'Tools::CodeView2' / 'HVScrollableView' / 'Tools::CodeView2::TextView').
     82    tw do:[
     83        tw setClipboardText: '''self'' halt'.
     84    ].
     85    tw do:[
     86        tw paste.
     87    ].
     88    tw wait.
     89    "/ Nasty, but we have to wait until background job finishes...
     90    Delay waitForMilliseconds: 200.
     91    self assert: tw contents = ('''self'' halt' , Character cr).
     92    self assert: ((tw list first emphasisAt: 3) includes: UserPreferences current stringEmphasis).
     93    self assert: ((tw list first emphasisAt: 3) includes: #color -> UserPreferences current stringColor).
     94
     95    "Created: / 19-07-2016 / 07:55:23 / Jan Vrany <jan.vrany@fit.cvut.cz>"
     96!
     97
     98test_issue_99_paste_02a
     99    "
     100    Test if contents gets re-highlightes after a paste
     101
     102    https://swing.fit.cvut.cz/projects/stx-jv/ticket/99#comment3
     103    "
     104
     105    | tw |
     106
     107    tw := (ws interactor / 'MainView' / 'NoteBook' / 'Tools::CodeView2' / 'HVScrollableView' / 'Tools::CodeView2::TextView').
     108    tw do:[
     109        tw setClipboardText: '[:exit|
     110model ifNil: [model := ValueHolder? with:''Enter a value''].
     111box := DialogBox? new.
     112box addTextLabel:''Enter some string, please:''.
     113box addInputFieldOn:model.
     114box addAbortButton; addOkButton.
     115box open. ]'
     116    ].
     117    tw do:[
     118        tw paste.
     119    ].
     120    tw wait.
     121    "/ Nasty, but we have to wait until background job finishes...
     122    Delay waitForMilliseconds: 100.
     123    self assert: ((tw list fourth emphasisAt: 27) includes: UserPreferences current stringEmphasis).
     124    self assert: ((tw list fourth emphasisAt: 27) includes: #color -> UserPreferences current stringColor).
     125
     126    "Created: / 19-07-2016 / 08:35:59 / Jan Vrany <jan.vrany@fit.cvut.cz>"
     127!
     128
     129test_issue_99_paste_02b
     130    "
     131    Test if contents gets re-highlightes after a paste.
     132    (note the missing closing bracket)
     133
     134    https://swing.fit.cvut.cz/projects/stx-jv/ticket/99#comment3
     135    "
     136
     137    | tw |
     138
     139    tw := (ws interactor / 'MainView' / 'NoteBook' / 'Tools::CodeView2' / 'HVScrollableView' / 'Tools::CodeView2::TextView').
     140    tw do:[
     141        tw setClipboardText: '[:exit|
     142model ifNil: [model := ValueHolder? with:''Enter a value''].
     143box := DialogBox? new.
     144box addTextLabel:''Enter some string, please:''.
     145box addInputFieldOn:model.
     146box addAbortButton; addOkButton.
     147box open. '
     148    ].
     149    tw do:[
     150        tw paste.
     151    ].
     152    tw wait.
     153    "/ Nasty, but we have to wait until background job finishes...
     154    Delay waitForMilliseconds: 100.
     155    self assert: ((tw list fourth emphasisAt: 27) includes: UserPreferences current stringEmphasis).
     156    self assert: ((tw list fourth emphasisAt: 27) includes: #color -> UserPreferences current stringColor).
     157
     158
     159    "Created: / 19-07-2016 / 08:36:56 / Jan Vrany <jan.vrany@fit.cvut.cz>"
     160!
     161
     162test_issue_99_paste_03a
     163    "
     164    Test if contents gets re-highlightes after a paste.
     165    In this case, code should not be highlighted as it contains
     166    a syntax error (note the missing closing bracket)
     167
     168    https://swing.fit.cvut.cz/projects/stx-jv/ticket/99#comment3
     169    "
     170
     171    | tw |
     172
     173    tw := (ws interactor / 'MainView' / 'NoteBook' / 'Tools::CodeView2' / 'HVScrollableView' / 'Tools::CodeView2::TextView').
     174    tw do:[
     175        tw setClipboardText: '|box field model warning condition|
     176min_range := ''-50''.
     177max_range := 50. '
     178    ].
     179    tw do:[
     180        tw paste.
     181    ].
     182    tw wait.
     183    "/ Nasty, but we have to wait until background job finishes...
     184    Delay waitForMilliseconds: 100.
     185    self assert: (tw list second emphasisAt: 17) isNil.
     186
     187    "Created: / 19-07-2016 / 08:37:56 / Jan Vrany <jan.vrany@fit.cvut.cz>"
     188!
     189
     190test_printId_01
     191    "A simple test that:
     192     1) type 3+4 into a workspace.
     193     2) select the 3+4
     194     3) Does a 'print-it'
     195    "
     196
     197    | tw |
     198
     199    tw := (ws interactor / 'MainView' / 'NoteBook' / 'Tools::CodeView2' / 'HVScrollableView' / 'Tools::CodeView2::TextView').
     200    Delay waitForMilliseconds: 10.   
     201    tw type: '3 + 4'.
     202
     203    self assert: tw selection isEmptyOrNil.
     204    tw type: #ShiftHome.
     205    self assert: tw selection size == 1.
     206    self assert: tw selection first string = '3 + 4'.
     207
     208    tw type: #PrintIt.
     209
     210    self assert: tw selection size == 1.
     211    self assert: tw selection first string = '7'.
     212
     213    self assert: tw list first string = '3 + 47'
     214
     215    "Created: / 22-07-2014 / 14:13:09 / Jan Vrany <jan.vrany@fit.cvut.cz>"
     216    "Modified (format): / 19-07-2016 / 08:29:06 / Jan Vrany <jan.vrany@fit.cvut.cz>"
     217! !
     218
     219!WorkspaceApplicationTests class methodsFor:'documentation'!
     220
     221version_HG
     222
     223    ^ '$Changeset: <not expanded> $'
     224! !
     225
  • new file tests/abbrev.stc

    diff -r 8b6e7ef9a974 -r 091022874048 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.
     4WorkspaceApplicationTests WorkspaceApplicationTests stx:libtool/tests 'Interface-Smalltalk-Tests' 1
     5stx_libtool_tests stx_libtool_tests stx:libtool/tests '* Projects & Packages *' 3
  • new file tests/bc.mak

    diff -r 8b6e7ef9a974 -r 091022874048 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\libtool
     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)WorkspaceApplicationTests.$(O) WorkspaceApplicationTests.$(C) WorkspaceApplicationTests.$(H): WorkspaceApplicationTests.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 8b6e7ef9a974 -r 091022874048 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 8b6e7ef9a974 -r 091022874048 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 _WorkspaceApplicationTests_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    _WorkspaceApplicationTests_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 8b6e7ef9a974 -r 091022874048 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 8b6e7ef9a974 -r 091022874048 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    "list packages which are to be explicitely excluded from the automatic constructed
     17     prerequisites list. If empty, everything that is found along the inheritance of any of
     18     my classes is considered to be a prerequisite package."
     19
     20    ^ #(
     21    )
     22!
     23
     24mandatoryPreRequisites
     25    "list packages which are mandatory as a prerequisite.
     26     This are packages containing superclasses of my classes and classes which
     27     are extended by myself.
     28     They are mandatory, because we need these packages as a prerequisite for loading and compiling.
     29     This method is generated automatically,
     30     by searching along the inheritance chain of all of my classes."
     31
     32    ^ #(
     33        #'stx:goodies/sunit'    "TestAsserter - superclass of WorkspaceApplicationTests"
     34        #'stx:libbasic'    "LibraryDefinition - superclass of stx_libtool_tests"
     35    )
     36!
     37
     38referencedPreRequisites
     39    "list packages which are a prerequisite, because they contain
     40     classes which are referenced by my classes.
     41     We do not need these packages as a prerequisite for compiling or loading,
     42     however, a class from it may be referenced during execution and having it
     43     unloaded then may lead to a runtime doesNotUnderstand error, unless the caller
     44     includes explicit checks for the package being present.
     45     This method is generated automatically,
     46     by searching all classes (and their packages) which are referenced by my classes."
     47
     48    ^ #(
     49        #'stx:libtool'    "WorkspaceApplication - referenced by WorkspaceApplicationTests>>setUp"
     50    )
     51!
     52
     53subProjects
     54    "list packages which are known as subprojects.
     55     The generated makefile will enter those and make there as well.
     56     However: they are not forced to be loaded when a package is loaded;
     57     for those, redefine requiredPrerequisites."
     58
     59    ^ #(
     60    )
     61! !
     62
     63!stx_libtool_tests class methodsFor:'description - contents'!
     64
     65classNamesAndAttributes
     66    "lists the classes which are to be included in the project.
     67     Each entry in the list may be: a single class-name (symbol),
     68     or an array-literal consisting of class name and attributes.
     69     Attributes are: #autoload or #<os> where os is one of win32, unix,..."
     70
     71    ^ #(
     72        "<className> or (<className> attributes...) in load order"
     73        WorkspaceApplicationTests
     74        #'stx_libtool_tests'
     75    )
     76!
     77
     78extensionMethodNames
     79    "lists the extension methods which are to be included in the project.
     80     Entries are 2-element array literals, consisting of class-name and selector.
     81     A correponding method with real names must be present in my concrete subclasses
     82     if it has extensions."
     83
     84    ^ #(
     85    )
     86! !
     87
     88!stx_libtool_tests class methodsFor:'description - project information'!
     89
     90companyName
     91    "Returns a company string which will appear in <lib>.rc.
     92     Under win32, this is placed into the dlls file-info"
     93
     94    ^ 'eXept Software AG'
     95!
     96
     97description
     98    "Returns a description string which will appear in nt.def / bc.def"
     99
     100    ^ 'Smalltalk/X Class library'
     101!
     102
     103legalCopyright
     104    "Returns a copyright string which will appear in <lib>.rc.
     105     Under win32, this is placed into the dlls file-info"
     106
     107    ^ 'Copyright Claus Gittinger 1988-2016\nCopyright eXept Software AG 2016'
     108!
     109
     110productName
     111    "Returns a product name which will appear in <lib>.rc.
     112     Under win32, this is placed into the dlls file-info.
     113     This method is usually redefined in a concrete application definition"
     114
     115    ^ 'Smalltalk/X'
     116! !
     117
     118!stx_libtool_tests class methodsFor:'documentation'!
     119
     120version_HG
     121    ^ '$Changeset: <not expanded> $'
     122! !
     123
  • new file tests/stx_libtool_testsWINrc.rc

    diff -r 8b6e7ef9a974 -r 091022874048 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     6,2,32767,32767
     7  PRODUCTVERSION  6,2,6,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", "eXept Software AG\0"
     22      VALUE "FileDescription", "Smalltalk/X Class library (LIB)\0"
     23      VALUE "FileVersion", "6.2.32767.32767\0"
     24      VALUE "InternalName", "stx:libtool/tests\0"
     25      VALUE "LegalCopyright", "Copyright Claus Gittinger 1988-2016\nCopyright eXept Software AG 2016\0"
     26      VALUE "ProductName", "Smalltalk/X\0"
     27      VALUE "ProductVersion", "6.2.6.0\0"
     28      VALUE "ProductDate", "Mon, 18 Jul 2016 19:53:38 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 8b6e7ef9a974 -r 091022874048 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