--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/EditFieldTests.st Thu Mar 21 11:09:23 2019 +0000
@@ -0,0 +1,127 @@
+"
+ COPYRIGHT (c) 2015 Jan Vrany
+ COPYRIGHT (c) 2017 Jan Vrany
+ All Rights Reserved
+
+ This software is furnished under a license and may be used
+ only in accordance with the terms of that license and with the
+ inclusion of the above copyright notice. This software may not
+ be provided or otherwise made available to, or used by, any
+ other person. No title to or ownership of the software is
+ hereby transferred.
+"
+"{ Package: 'stx:libwidg/tests' }"
+
+"{ NameSpace: Smalltalk }"
+
+TestCase subclass:#EditFieldTests
+ instanceVariableNames:'window'
+ classVariableNames:''
+ poolDictionaries:''
+ category:'Views-Basic-Tests'
+!
+
+!EditFieldTests class methodsFor:'documentation'!
+
+copyright
+"
+ COPYRIGHT (c) 2015 Jan Vrany
+ COPYRIGHT (c) 2017 Jan Vrany
+ All Rights Reserved
+
+ This software is furnished under a license and may be used
+ only in accordance with the terms of that license and with the
+ inclusion of the above copyright notice. This software may not
+ be provided or otherwise made available to, or used by, any
+ other person. No title to or ownership of the software is
+ hereby transferred.
+"
+! !
+
+!EditFieldTests methodsFor:'running'!
+
+setUp
+ | firstEditField |
+
+ super setUp.
+ Smalltalk loadPackage:'stx:goodies/sunit/ext/ui'.
+
+ Screen current isNil ifTrue:[
+ Smalltalk openDisplay.
+ ].
+ self skipIf:Screen current isNil description:'No display connection'.
+
+ "Add your own code here..."
+ window := StandardSystemView new.
+ window label: self printString.
+ window extent: 200@100.
+
+ firstEditField := EditField origin: (0.0@0.0) in: window.
+ firstEditField name: #FirstEditField.
+ firstEditField width: 1.0.
+ firstEditField model: 'Text to be tested' asValue.
+
+ window open.
+ window waitUntilVisible.
+
+ "Modified: / 23-01-2019 / 16:00:33 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified (format): / 20-03-2019 / 13:20:13 / svestkap"
+!
+
+tearDown
+ window isOpen ifTrue: [
+ window close
+ ]
+
+ "Created: / 23-01-2019 / 15:08:12 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 20-03-2019 / 13:17:02 / svestkap"
+! !
+
+!EditFieldTests methodsFor:'tests'!
+
+test_issue_261a
+ "Do a screenshot of an EditField before pressing right arrow key and after. The results should match."
+ | editField editFieldInteractor image firstDetectedPixelColors secondDetectedPixelColors |
+
+ editField := (window subViews select: [ :subView |
+ subView name = #FirstEditField
+ ]) first.
+
+ editFieldInteractor := editField interactor.
+
+ editField takeFocus.
+ editFieldInteractor type: #Home.
+
+ Delay waitForSeconds:1.
+ image := Image fromView:window grab:false.
+ firstDetectedPixelColors := Set new.
+ 1 to: 30 do: [ :y |
+ 5 to: 50 do: [ :x |
+ firstDetectedPixelColors add:(image colorAtX:x y:y)
+ ]
+ ].
+
+ editFieldInteractor type: #End.
+ editFieldInteractor type: #CursorRight.
+
+ Delay waitForSeconds:1.
+ image := Image fromView:window grab:false.
+ secondDetectedPixelColors := Set new.
+ 1 to: 30 do: [ :y |
+ 5 to: 50 do: [ :x |
+ secondDetectedPixelColors add:(image colorAtX:x y:y)
+ ]
+ ].
+
+ self assert:(firstDetectedPixelColors = secondDetectedPixelColors).
+
+ "Created: / 21-03-2019 / 11:05:48 / jv"
+! !
+
+!EditFieldTests class methodsFor:'documentation'!
+
+version_HG
+
+ ^ '$Changeset: <not expanded> $'
+! !
+
--- a/tests/Make.proto Tue Mar 19 15:13:59 2019 +0000
+++ b/tests/Make.proto Thu Mar 21 11:09:23 2019 +0000
@@ -1,144 +1,132 @@
-# $Header$
-#
-# DO NOT EDIT
-# automagically generated from the projectDefinition: stx_libwidg_tests.
-#
-# Warning: once you modify this file, do not rerun
-# stmkmp or projectDefinition-build again - otherwise, your changes are lost.
-#
-# The Makefile as generated by this Make.proto supports the following targets:
-# make - compile all st-files to a classLib
-# make clean - clean all temp files
-# make clobber - clean all
-#
-# This file contains definitions for Unix based platforms.
-# It shares common definitions with the win32-make in Make.spec.
-
-#
-# position (of this package) in directory hierarchy:
-# (must point to ST/X top directory, for tools and includes)
-TOP=../..
-INCLUDE_TOP=$(TOP)/..
-
-# subdirectories where targets are to be made:
-SUBDIRS=
-
-
-# subdirectories where Makefiles are to be made:
-# (only define if different from SUBDIRS)
-# ALLSUBDIRS=
-
-REQUIRED_SUPPORT_DIRS=
-
-# if your embedded C code requires any system includes,
-# add the path(es) here:,
-# ********** OPTIONAL: MODIFY the next lines ***
-# LOCALINCLUDES=-Ifoo -Ibar
-LOCALINCLUDES= -I$(INCLUDE_TOP)/stx/goodies/smallsense -I$(INCLUDE_TOP)/stx/goodies/sunit -I$(INCLUDE_TOP)/stx/libbasic -I$(INCLUDE_TOP)/stx/libview -I$(INCLUDE_TOP)/stx/libwidg
-
-
-# if you need any additional defines for embedded C code,
-# add them here:,
-# ********** OPTIONAL: MODIFY the next lines ***
-# LOCALDEFINES=-Dfoo -Dbar -DDEBUG
-LOCALDEFINES=
-
-LIBNAME=libstx_libwidg_tests
-STCLOCALOPT='-package=$(PACKAGE)' -I. $(LOCALINCLUDES) $(STCLOCALOPTIMIZATIONS) $(STCWARNINGS) $(LOCALDEFINES) -headerDir=. -varPrefix=$(LIBNAME)
-
-
-# ********** OPTIONAL: MODIFY the next line ***
-# additional C-libraries that should be pre-linked with the class-objects
-LD_OBJ_LIBS=
-LOCAL_SHARED_LIBS=
-
-
-# ********** OPTIONAL: MODIFY the next line ***
-# additional C targets or libraries should be added below
-LOCAL_EXTRA_TARGETS=
-
-OBJS= $(COMMON_OBJS) $(UNIX_OBJS)
-
-
-
-all:: preMake classLibRule postMake
-
-pre_objs::
-
-
-
-
-
-
-# Enforce recompilation of package definition class if Mercurial working
-# copy state changes. Together with --guessVersion it ensures that package
-# definition class always contains correct binary revision string.
-ifneq (**NOHG**, $(shell hg root 2> /dev/null || echo -n '**NOHG**'))
-stx_libwidg_tests.$(O): $(shell hg root)/.hg/dirstate
-endif
-
-
-
-
-# run default testsuite for this package
-test: $(TOP)/goodies/builder/reports
- $(MAKE) -C $(TOP)/goodies/builder/reports -f Makefile.init
- $(TOP)/goodies/builder/reports/report-runner.sh -D . -r Builder::TestReport -p $(PACKAGE)
-
-
-
-# add more install actions here
-install::
-
-# add more install actions for aux-files (resources) here
-installAux::
-
-# add more preMake actions here
-preMake::
-
-# add more postMake actions here
-postMake:: cleanjunk
-
-# build all mandatory prerequisite packages (containing superclasses) for this package
-prereq:
- cd ../../libbasic && $(MAKE) "CFLAGS_LOCAL=$(GLOBALDEFINES)"
- cd ../../goodies/refactoryBrowser/helpers && $(MAKE) "CFLAGS_LOCAL=$(GLOBALDEFINES)"
- cd ../../goodies/refactoryBrowser/parser && $(MAKE) "CFLAGS_LOCAL=$(GLOBALDEFINES)"
- cd ../../goodies/regex && $(MAKE) "CFLAGS_LOCAL=$(GLOBALDEFINES)"
- cd ../../libbasic2 && $(MAKE) "CFLAGS_LOCAL=$(GLOBALDEFINES)"
- cd ../../libbasic3 && $(MAKE) "CFLAGS_LOCAL=$(GLOBALDEFINES)"
- cd ../../libcomp && $(MAKE) "CFLAGS_LOCAL=$(GLOBALDEFINES)"
- cd ../../libui && $(MAKE) "CFLAGS_LOCAL=$(GLOBALDEFINES)"
- cd ../../libview && $(MAKE) "CFLAGS_LOCAL=$(GLOBALDEFINES)"
- cd ../../libview2 && $(MAKE) "CFLAGS_LOCAL=$(GLOBALDEFINES)"
- cd ../../goodies/refactoryBrowser/browser && $(MAKE) "CFLAGS_LOCAL=$(GLOBALDEFINES)"
- cd ../../goodies/sunit && $(MAKE) "CFLAGS_LOCAL=$(GLOBALDEFINES)"
- cd ../ && $(MAKE) "CFLAGS_LOCAL=$(GLOBALDEFINES)"
- cd ../../goodies/refactoryBrowser/lint && $(MAKE) "CFLAGS_LOCAL=$(GLOBALDEFINES)"
- cd ../../libhtml && $(MAKE) "CFLAGS_LOCAL=$(GLOBALDEFINES)"
- cd ../../libwidg2 && $(MAKE) "CFLAGS_LOCAL=$(GLOBALDEFINES)"
- cd ../../libtool && $(MAKE) "CFLAGS_LOCAL=$(GLOBALDEFINES)"
- cd ../../goodies/smallsense && $(MAKE) "CFLAGS_LOCAL=$(GLOBALDEFINES)"
-
-
-
-# build all packages containing referenced classes for this package
-# they are not needed to compile the package (but later, to load it)
-references:
-
-
-cleanjunk::
- -rm -f *.s *.s2
-
-clean::
- -rm -f *.o *.H
-
-clobber:: clean
- -rm -f *.so *.dll
-
-
-# BEGINMAKEDEPEND --- do not remove this line; make depend needs it
-$(OUTDIR)stx_libwidg_tests.$(O) stx_libwidg_tests.$(H): stx_libwidg_tests.st $(INCLUDE_TOP)/stx/libbasic/LibraryDefinition.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libbasic/ProjectDefinition.$(H) $(STCHDR)
-
-# ENDMAKEDEPEND --- do not remove this line
-
+# $Header$
+#
+# DO NOT EDIT
+# automagically generated from the projectDefinition: stx_libwidg_tests.
+#
+# Warning: once you modify this file, do not rerun
+# stmkmp or projectDefinition-build again - otherwise, your changes are lost.
+#
+# The Makefile as generated by this Make.proto supports the following targets:
+# make - compile all st-files to a classLib
+# make clean - clean all temp files
+# make clobber - clean all
+#
+# This file contains definitions for Unix based platforms.
+# It shares common definitions with the win32-make in Make.spec.
+
+#
+# position (of this package) in directory hierarchy:
+# (must point to ST/X top directory, for tools and includes)
+TOP=../..
+INCLUDE_TOP=$(TOP)/..
+
+# subdirectories where targets are to be made:
+SUBDIRS=
+
+
+# subdirectories where Makefiles are to be made:
+# (only define if different from SUBDIRS)
+# ALLSUBDIRS=
+
+REQUIRED_SUPPORT_DIRS=
+
+# if your embedded C code requires any system includes,
+# add the path(es) here:,
+# ********** OPTIONAL: MODIFY the next lines ***
+# LOCALINCLUDES=-Ifoo -Ibar
+LOCALINCLUDES= -I$(INCLUDE_TOP)/stx/goodies/sunit -I$(INCLUDE_TOP)/stx/libbasic -I$(INCLUDE_TOP)/stx/libview -I$(INCLUDE_TOP)/stx/libwidg
+
+
+# if you need any additional defines for embedded C code,
+# add them here:,
+# ********** OPTIONAL: MODIFY the next lines ***
+# LOCALDEFINES=-Dfoo -Dbar -DDEBUG
+LOCALDEFINES=
+
+LIBNAME=libstx_libwidg_tests
+STCLOCALOPT='-package=$(PACKAGE)' -I. $(LOCALINCLUDES) $(STCLOCALOPTIMIZATIONS) $(STCWARNINGS) $(LOCALDEFINES) -headerDir=. -varPrefix=$(LIBNAME)
+
+
+# ********** OPTIONAL: MODIFY the next line ***
+# additional C-libraries that should be pre-linked with the class-objects
+LD_OBJ_LIBS=
+LOCAL_SHARED_LIBS=
+
+
+# ********** OPTIONAL: MODIFY the next line ***
+# additional C targets or libraries should be added below
+LOCAL_EXTRA_TARGETS=
+
+OBJS= $(COMMON_OBJS) $(UNIX_OBJS)
+
+
+
+all:: preMake classLibRule postMake
+
+pre_objs::
+
+
+
+
+
+
+# Enforce recompilation of package definition class if Mercurial working
+# copy state changes. Together with --guessVersion it ensures that package
+# definition class always contains correct binary revision string.
+ifneq (**NOHG**, $(shell hg root 2> /dev/null || echo -n '**NOHG**'))
+stx_libwidg_tests.$(O): $(shell hg root)/.hg/dirstate
+endif
+
+
+
+
+# run default testsuite for this package
+test: $(TOP)/goodies/builder/reports
+ $(MAKE) -C $(TOP)/goodies/builder/reports -f Makefile.init
+ $(TOP)/goodies/builder/reports/report-runner.sh -D . -r Builder::TestReport -p $(PACKAGE)
+
+
+
+# add more install actions here
+install::
+
+# add more install actions for aux-files (resources) here
+installAux::
+
+# add more preMake actions here
+preMake::
+
+# add more postMake actions here
+postMake:: cleanjunk
+
+# build all mandatory prerequisite packages (containing superclasses) for this package
+prereq:
+ cd ../../libbasic && $(MAKE) "CFLAGS_LOCAL=$(GLOBALDEFINES) "
+ cd ../../libbasic2 && $(MAKE) "CFLAGS_LOCAL=$(GLOBALDEFINES) "
+ cd ../../libview && $(MAKE) "CFLAGS_LOCAL=$(GLOBALDEFINES) "
+ cd ../../libview2 && $(MAKE) "CFLAGS_LOCAL=$(GLOBALDEFINES) "
+ cd ../../goodies/sunit && $(MAKE) "CFLAGS_LOCAL=$(GLOBALDEFINES) "
+
+
+
+# build all packages containing referenced classes for this package
+# they are not needed to compile the package (but later, to load it)
+references:
+
+
+cleanjunk::
+ -rm -f *.s *.s2
+
+clean::
+ -rm -f *.o *.H
+
+clobber:: clean
+ -rm -f *.so *.dll
+
+
+# BEGINMAKEDEPEND --- do not remove this line; make depend needs it
+$(OUTDIR)EditFieldTests.$(O) EditFieldTests.$(C) EditFieldTests.$(H): EditFieldTests.st $(INCLUDE_TOP)/stx/goodies/sunit/TestAsserter.$(H) $(INCLUDE_TOP)/stx/goodies/sunit/TestCase.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
+$(OUTDIR)stx_libwidg_tests.$(O) stx_libwidg_tests.$(C) stx_libwidg_tests.$(H): stx_libwidg_tests.st $(INCLUDE_TOP)/stx/libbasic/LibraryDefinition.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libbasic/ProjectDefinition.$(H) $(STCHDR)
+
+# ENDMAKEDEPEND --- do not remove this line
+
--- a/tests/Make.spec Tue Mar 19 15:13:59 2019 +0000
+++ b/tests/Make.spec Thu Mar 21 11:09:23 2019 +0000
@@ -1,63 +1,65 @@
-# $Header$
-#
-# DO NOT EDIT
-# automagically generated from the projectDefinition: stx_libwidg_tests.
-#
-# Warning: once you modify this file, do not rerun
-# stmkmp or projectDefinition-build again - otherwise, your changes are lost.
-#
-# This file contains specifications which are common to all platforms.
-#
-
-# Do NOT CHANGE THESE DEFINITIONS
-# (otherwise, ST/X will have a hard time to find out the packages location from its packageID,
-# to find the source code of a class and to find the library for a package)
-MODULE=stx
-MODULE_DIR=libwidg/tests
-PACKAGE=$(MODULE):$(MODULE_DIR)
-
-
-# Argument(s) to the stc compiler (stc --usage).
-# -headerDir=. : create header files locally
-# (if removed, they will be created as common
-# -Pxxx : defines the package
-# -Zxxx : a prefix for variables within the classLib
-# -Dxxx : defines passed to to CC for inline C-code
-# -Ixxx : include path passed to CC for inline C-code
-# +optspace : optimized for space
-# +optspace2 : optimized more for space
-# +optspace3 : optimized even more for space
-# +optinline : generate inline code for some ST constructs
-# +inlineNew : additionally inline new
-# +inlineMath : additionally inline some floatPnt math stuff
-#
-# ********** OPTIONAL: MODIFY the next line(s) ***
-# STCLOCALOPTIMIZATIONS=+optinline +inlineNew
-# STCLOCALOPTIMIZATIONS=+optspace3
-STCLOCALOPTIMIZATIONS=+optspace3
-
-
-# Argument(s) to the stc compiler (stc --usage).
-# -warn : no warnings
-# -warnNonStandard : no warnings about ST/X extensions
-# -warnEOLComments : no warnings about EOL comment extension
-# -warnPrivacy : no warnings about privateClass extension
-# -warnUnused : no warnings about unused variables
-#
-# ********** OPTIONAL: MODIFY the next line(s) ***
-# STCWARNINGS=-warn
-# STCWARNINGS=-warnNonStandard
-# STCWARNINGS=-warnEOLComments
-STCWARNINGS=-warnNonStandard
-
-COMMON_CLASSES= \
- stx_libwidg_tests \
-
-
-
-
-COMMON_OBJS= \
- $(OUTDIR_SLASH)stx_libwidg_tests.$(O) \
-
-
-
+# $Header$
+#
+# DO NOT EDIT
+# automagically generated from the projectDefinition: stx_libwidg_tests.
+#
+# Warning: once you modify this file, do not rerun
+# stmkmp or projectDefinition-build again - otherwise, your changes are lost.
+#
+# This file contains specifications which are common to all platforms.
+#
+
+# Do NOT CHANGE THESE DEFINITIONS
+# (otherwise, ST/X will have a hard time to find out the packages location from its packageID,
+# to find the source code of a class and to find the library for a package)
+MODULE=stx
+MODULE_DIR=libwidg/tests
+PACKAGE=$(MODULE):$(MODULE_DIR)
+
+
+# Argument(s) to the stc compiler (stc --usage).
+# -headerDir=. : create header files locally
+# (if removed, they will be created as common
+# -Pxxx : defines the package
+# -Zxxx : a prefix for variables within the classLib
+# -Dxxx : defines passed to CC for inline C-code
+# -Ixxx : include path passed to CC for inline C-code
+# +optspace : optimized for space
+# +optspace2 : optimized more for space
+# +optspace3 : optimized even more for space
+# +optinline : generate inline code for some ST constructs
+# +inlineNew : additionally inline new
+# +inlineMath : additionally inline some floatPnt math stuff
+#
+# ********** OPTIONAL: MODIFY the next line(s) ***
+# STCLOCALOPTIMIZATIONS=+optinline +inlineNew
+# STCLOCALOPTIMIZATIONS=+optspace3
+STCLOCALOPTIMIZATIONS=+optspace3
+
+
+# Argument(s) to the stc compiler (stc --usage).
+# -warn : no warnings
+# -warnNonStandard : no warnings about ST/X extensions
+# -warnEOLComments : no warnings about EOL comment extension
+# -warnPrivacy : no warnings about privateClass extension
+# -warnUnused : no warnings about unused variables
+#
+# ********** OPTIONAL: MODIFY the next line(s) ***
+# STCWARNINGS=-warn
+# STCWARNINGS=-warnNonStandard
+# STCWARNINGS=-warnEOLComments
+STCWARNINGS=-warnNonStandard
+
+COMMON_CLASSES= \
+ EditFieldTests \
+ stx_libwidg_tests \
+
+
+
+
+COMMON_OBJS= \
+ $(OUTDIR)EditFieldTests.$(O) \
+ $(OUTDIR)stx_libwidg_tests.$(O) \
+
+
+
--- a/tests/Makefile.init Tue Mar 19 15:13:59 2019 +0000
+++ b/tests/Makefile.init Thu Mar 21 11:09:23 2019 +0000
@@ -1,27 +1,27 @@
-#
-# DO NOT EDIT
-#
-# make uses this file (Makefile) only, if there is no
-# file named "makefile" (lower-case m) in the same directory.
-# My only task is to generate the real makefile and call make again.
-# Thereafter, I am no longer used and needed.
-#
-# MACOSX caveat:
-# as filenames are not case sensitive (in a default setup),
-# we cannot use the above trick. Therefore, this file is now named
-# "Makefile.init", and you have to execute "make -f Makefile.init" to
-# get the initial makefile. This is now also done by the toplevel CONFIG
-# script.
-
-.PHONY: run
-
-run: makefile
- $(MAKE) -f makefile
-
-#only needed for the definition of $(TOP)
-include Make.proto
-
-makefile: mf
-
-mf:
- $(TOP)/rules/stmkmf
+#
+# DO NOT EDIT
+#
+# make uses this file (Makefile) only, if there is no
+# file named "makefile" (lower-case m) in the same directory.
+# My only task is to generate the real makefile and call make again.
+# Thereafter, I am no longer used and needed.
+#
+# MACOSX caveat:
+# as filenames are not case sensitive (in a default setup),
+# we cannot use the above trick. Therefore, this file is now named
+# "Makefile.init", and you have to execute "make -f Makefile.init" to
+# get the initial makefile. This is now also done by the toplevel CONFIG
+# script.
+
+.PHONY: run
+
+run: makefile
+ $(MAKE) -f makefile
+
+#only needed for the definition of $(TOP)
+include Make.proto
+
+makefile: mf
+
+mf:
+ $(TOP)/rules/stmkmf
--- a/tests/abbrev.stc Tue Mar 19 15:13:59 2019 +0000
+++ b/tests/abbrev.stc Thu Mar 21 11:09:23 2019 +0000
@@ -1,5 +1,6 @@
-# automagically generated by the project definition
-# this file is needed for stc to be able to compile modules independently.
-# it provides information about a classes filename, category and especially namespace.
-EditTextViewTests EditTextViewTests stx:libwidg/tests 'Views-Text-Tests' 1
-stx_libwidg_tests stx_libwidg_tests stx:libwidg/tests '* Projects & Packages *' 3
+# automagically generated by the project definition
+# this file is needed for stc to be able to compile modules independently.
+# it provides information about a classes filename, category and especially namespace.
+EditFieldTests EditFieldTests stx:libwidg/tests 'Views-Basic-Tests' 1
+stx_libwidg_tests stx_libwidg_tests stx:libwidg/tests '* Projects & Packages *' 3
+EditTextViewTests EditTextViewTests stx:libwidg/tests 'Views-Text-Tests' 1
--- a/tests/bc.mak Tue Mar 19 15:13:59 2019 +0000
+++ b/tests/bc.mak Thu Mar 21 11:09:23 2019 +0000
@@ -1,99 +1,87 @@
-# $Header$
-#
-# DO NOT EDIT
-# automagically generated from the projectDefinition: stx_libwidg_tests.
-#
-# Warning: once you modify this file, do not rerun
-# stmkmp or projectDefinition-build again - otherwise, your changes are lost.
-#
-# Notice, that the name bc.mak is historical (from times, when only borland c was supported).
-# This file contains make rules for the win32 platform using either borland-bcc or visual-c.
-# It shares common definitions with the unix-make in Make.spec.
-# The bc.mak supports the following targets:
-# bmake - compile all st-files to a classLib (dll)
-# bmake clean - clean all temp files
-# bmake clobber - clean all
-#
-# Historic Note:
-# this used to contain only rules to make with borland
-# (called via bmake, by "make.exe -f bc.mak")
-# this has changed; it is now also possible to build using microsoft visual c
-# (called via vcmake, by "make.exe -f bc.mak -DUSEVC")
-#
-TOP=..\..
-INCLUDE_TOP=$(TOP)\..
-
-
-
-!INCLUDE $(TOP)\rules\stdHeader_bc
-
-!INCLUDE Make.spec
-
-LIBNAME=libstx_libwidg_tests
-MODULE_PATH=libwidg\tests
-RESFILES=tests.$(RES)
-
-
-
-LOCALINCLUDES= -I$(INCLUDE_TOP)\stx\goodies\smallsense -I$(INCLUDE_TOP)\stx\goodies\sunit -I$(INCLUDE_TOP)\stx\libbasic -I$(INCLUDE_TOP)\stx\libview -I$(INCLUDE_TOP)\stx\libwidg
-LOCALDEFINES=
-
-STCLOCALOPT=-package=$(PACKAGE) -I. $(LOCALINCLUDES) -headerDir=. $(STCLOCALOPTIMIZATIONS) $(STCWARNINGS) $(LOCALDEFINES) -varPrefix=$(LIBNAME)
-LOCALLIBS=
-
-OBJS= $(COMMON_OBJS) $(WIN32_OBJS)
-
-ALL:: classLibRule
-
-classLibRule: $(OUTDIR) $(OUTDIR)$(LIBNAME).dll
-
-!INCLUDE $(TOP)\rules\stdRules_bc
-
-# build all mandatory prerequisite packages (containing superclasses) for this package
-prereq:
- pushd ..\..\libbasic & $(MAKE_BAT) "CFLAGS_LOCAL=$(GLOBALDEFINES) "
- pushd ..\..\goodies\refactoryBrowser\helpers & $(MAKE_BAT) "CFLAGS_LOCAL=$(GLOBALDEFINES) "
- pushd ..\..\goodies\refactoryBrowser\parser & $(MAKE_BAT) "CFLAGS_LOCAL=$(GLOBALDEFINES) "
- pushd ..\..\goodies\regex & $(MAKE_BAT) "CFLAGS_LOCAL=$(GLOBALDEFINES) "
- pushd ..\..\libbasic2 & $(MAKE_BAT) "CFLAGS_LOCAL=$(GLOBALDEFINES) "
- pushd ..\..\libbasic3 & $(MAKE_BAT) "CFLAGS_LOCAL=$(GLOBALDEFINES) "
- pushd ..\..\libcomp & $(MAKE_BAT) "CFLAGS_LOCAL=$(GLOBALDEFINES) "
- pushd ..\..\libui & $(MAKE_BAT) "CFLAGS_LOCAL=$(GLOBALDEFINES) "
- pushd ..\..\libview & $(MAKE_BAT) "CFLAGS_LOCAL=$(GLOBALDEFINES) "
- pushd ..\..\libview2 & $(MAKE_BAT) "CFLAGS_LOCAL=$(GLOBALDEFINES) "
- pushd ..\..\goodies\refactoryBrowser\browser & $(MAKE_BAT) "CFLAGS_LOCAL=$(GLOBALDEFINES) "
- pushd ..\..\goodies\sunit & $(MAKE_BAT) "CFLAGS_LOCAL=$(GLOBALDEFINES) "
- pushd .. & $(MAKE_BAT) "CFLAGS_LOCAL=$(GLOBALDEFINES) "
- pushd ..\..\goodies\refactoryBrowser\lint & $(MAKE_BAT) "CFLAGS_LOCAL=$(GLOBALDEFINES) "
- pushd ..\..\libhtml & $(MAKE_BAT) "CFLAGS_LOCAL=$(GLOBALDEFINES) "
- pushd ..\..\libwidg2 & $(MAKE_BAT) "CFLAGS_LOCAL=$(GLOBALDEFINES) "
- pushd ..\..\libtool & $(MAKE_BAT) "CFLAGS_LOCAL=$(GLOBALDEFINES) "
- pushd ..\..\goodies\smallsense & $(MAKE_BAT) "CFLAGS_LOCAL=$(GLOBALDEFINES) "
-
-
-
-
-
-
-
-test: $(TOP)\goodies\builder\reports\NUL
- pushd $(TOP)\goodies\builder\reports & $(MAKE_BAT)
- $(TOP)\goodies\builder\reports\report-runner.bat -D . -r Builder::TestReport -p $(PACKAGE)
-
-clean::
- del *.$(CSUFFIX)
-
-
-# BEGINMAKEDEPEND --- do not remove this line; make depend needs it
-$(OUTDIR)stx_libwidg_tests.$(O) stx_libwidg_tests.$(H): stx_libwidg_tests.st $(INCLUDE_TOP)\stx\libbasic\LibraryDefinition.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libbasic\ProjectDefinition.$(H) $(STCHDR)
-
-# ENDMAKEDEPEND --- do not remove this line
-
-# **Must be at end**
-
-# Enforce recompilation of package definition class if Mercurial working
-# copy state changes. Together with --guessVersion it ensures that package
-# definition class always contains correct binary revision string.
-!IFDEF HGROOT
-$(OUTDIR)stx_libwidg_tests.$(O): $(HGROOT)\.hg\dirstate
-!ENDIF
+# $Header$
+#
+# DO NOT EDIT
+# automagically generated from the projectDefinition: stx_libwidg_tests.
+#
+# Warning: once you modify this file, do not rerun
+# stmkmp or projectDefinition-build again - otherwise, your changes are lost.
+#
+# Notice, that the name bc.mak is historical (from times, when only borland c was supported).
+# This file contains make rules for the win32 platform using either borland-bcc or visual-c.
+# It shares common definitions with the unix-make in Make.spec.
+# The bc.mak supports the following targets:
+# bmake - compile all st-files to a classLib (dll)
+# bmake clean - clean all temp files
+# bmake clobber - clean all
+#
+# Historic Note:
+# this used to contain only rules to make with borland
+# (called via bmake, by "make.exe -f bc.mak")
+# this has changed; it is now also possible to build using microsoft visual c
+# (called via vcmake, by "make.exe -f bc.mak -DUSEVC")
+#
+TOP=..\..
+INCLUDE_TOP=$(TOP)\..
+
+
+
+!INCLUDE $(TOP)\rules\stdHeader_bc
+
+!INCLUDE Make.spec
+
+LIBNAME=libstx_libwidg_tests
+MODULE_PATH=libwidg\tests
+RESFILES=stx_libwidg_testsWINrc.$(RES)
+
+
+
+LOCALINCLUDES= -I$(INCLUDE_TOP)\stx\goodies\sunit -I$(INCLUDE_TOP)\stx\libbasic -I$(INCLUDE_TOP)\stx\libview -I$(INCLUDE_TOP)\stx\libwidg
+LOCALDEFINES=
+
+STCLOCALOPT=-package=$(PACKAGE) -I. $(LOCALINCLUDES) -headerDir=. $(STCLOCALOPTIMIZATIONS) $(STCWARNINGS) $(LOCALDEFINES) -varPrefix=$(LIBNAME)
+LOCALLIBS=
+
+OBJS= $(COMMON_OBJS) $(WIN32_OBJS)
+
+ALL:: classLibRule
+
+classLibRule: $(OUTDIR) $(OUTDIR)$(LIBNAME).dll
+
+!INCLUDE $(TOP)\rules\stdRules_bc
+
+# build all mandatory prerequisite packages (containing superclasses) for this package
+prereq:
+ pushd ..\..\libbasic & $(MAKE_BAT) "CFLAGS_LOCAL=$(GLOBALDEFINES) "
+ pushd ..\..\libbasic2 & $(MAKE_BAT) "CFLAGS_LOCAL=$(GLOBALDEFINES) "
+ pushd ..\..\libview & $(MAKE_BAT) "CFLAGS_LOCAL=$(GLOBALDEFINES) "
+ pushd ..\..\libview2 & $(MAKE_BAT) "CFLAGS_LOCAL=$(GLOBALDEFINES) "
+ pushd ..\..\goodies\sunit & $(MAKE_BAT) "CFLAGS_LOCAL=$(GLOBALDEFINES) "
+
+
+
+
+
+
+
+test: $(TOP)\goodies\builder\reports
+ pushd $(TOP)\goodies\builder\reports & $(MAKE_BAT)
+ $(TOP)\goodies\builder\reports\report-runner.bat -D . -r Builder::TestReport -p $(PACKAGE)
+
+clean::
+ -del *.$(CSUFFIX)
+
+
+# BEGINMAKEDEPEND --- do not remove this line; make depend needs it
+$(OUTDIR)EditFieldTests.$(O) EditFieldTests.$(C) EditFieldTests.$(H): EditFieldTests.st $(INCLUDE_TOP)\stx\goodies\sunit\TestAsserter.$(H) $(INCLUDE_TOP)\stx\goodies\sunit\TestCase.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
+$(OUTDIR)stx_libwidg_tests.$(O) stx_libwidg_tests.$(C) stx_libwidg_tests.$(H): stx_libwidg_tests.st $(INCLUDE_TOP)\stx\libbasic\LibraryDefinition.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libbasic\ProjectDefinition.$(H) $(STCHDR)
+
+# ENDMAKEDEPEND --- do not remove this line
+
+# **Must be at end**
+
+# Enforce recompilation of package definition class if Mercurial working
+# copy state changes. Together with --guessVersion it ensures that package
+# definition class always contains correct binary revision string.
+!IFDEF HGROOT
+$(OUTDIR)stx_libwidg_tests.$(O): $(HGROOT)\.hg\dirstate
+!ENDIF
--- a/tests/bmake.bat Tue Mar 19 15:13:59 2019 +0000
+++ b/tests/bmake.bat Thu Mar 21 11:09:23 2019 +0000
@@ -1,12 +1,15 @@
-@REM -------
-@REM make using Borland bcc32
-@REM type bmake, and wait...
-@REM do not edit - automatically generated from ProjectDefinition
-@REM -------
-@SET DEFINES=
-@REM Kludge got Mercurial, cannot be implemented in Borland make
-@FOR /F "tokens=*" %%i in ('hg root') do SET HGROOT=%%i
-@IF "%HGROOT%" NEQ "" SET DEFINES=%DEFINES% "-DHGROOT=%HGROOT%"
-make.exe -N -f bc.mak %DEFINES% %*
-
-
+@REM -------
+@REM make using Borland bcc32
+@REM type bmake, and wait...
+@REM do not edit - automatically generated from ProjectDefinition
+@REM -------
+@SET DEFINES=
+@REM Kludge got Mercurial, cannot be implemented in Borland make
+@FOR /F "tokens=*" %%i in ('hg root') do SET HGROOT=%%i
+@IF "%HGROOT%" NEQ "" SET DEFINES=%DEFINES% "-DHGROOT=%HGROOT%"
+
+make.exe -N -f bc.mak %DEFINES% %*
+
+
+
+
--- a/tests/libInit.cc Tue Mar 19 15:13:59 2019 +0000
+++ b/tests/libInit.cc Thu Mar 21 11:09:23 2019 +0000
@@ -1,34 +1,40 @@
-/*
- * $Header$
- *
- * DO NOT EDIT
- * automagically generated from the projectDefinition: stx_libwidg_tests.
- */
-#define __INDIRECTVMINITCALLS__
-#include <stc.h>
-
-#ifdef WIN32
-# pragma codeseg INITCODE "INITCODE"
-#endif
-
-#if defined(INIT_TEXT_SECTION) || defined(DLL_EXPORT)
-DLL_EXPORT void _libstx_libwidg_tests_Init() INIT_TEXT_SECTION;
-DLL_EXPORT void _libstx_libwidg_tests_InitDefinition() INIT_TEXT_SECTION;
-#endif
-
-void _libstx_libwidg_tests_InitDefinition(pass, __pRT__, snd)
-OBJ snd; struct __vmData__ *__pRT__; {
-__BEGIN_PACKAGE2__("libstx_libwidg_tests__DFN", _libstx_libwidg_tests_InitDefinition, "stx:libwidg/tests");
-_stx_137libwidg_137tests_Init(pass,__pRT__,snd);
-
-__END_PACKAGE__();
-}
-
-void _libstx_libwidg_tests_Init(pass, __pRT__, snd)
-OBJ snd; struct __vmData__ *__pRT__; {
-__BEGIN_PACKAGE2__("libstx_libwidg_tests", _libstx_libwidg_tests_Init, "stx:libwidg/tests");
-_stx_137libwidg_137tests_Init(pass,__pRT__,snd);
-
-
-__END_PACKAGE__();
-}
+/*
+ * $Header$
+ *
+ * DO NOT EDIT
+ * automagically generated from the projectDefinition: stx_libwidg_tests.
+ */
+#define __INDIRECTVMINITCALLS__
+#include <stc.h>
+
+#ifdef WIN32
+# pragma codeseg INITCODE "INITCODE"
+#endif
+
+#if defined(INIT_TEXT_SECTION) || defined(DLL_EXPORT)
+DLL_EXPORT void _libstx_libwidg_tests_Init() INIT_TEXT_SECTION;
+DLL_EXPORT void _libstx_libwidg_tests_InitDefinition() INIT_TEXT_SECTION;
+#endif
+
+extern void _EditFieldTests_Init(int pass, struct __vmData__ *__pRT__, OBJ snd);
+extern void _stx_137libwidg_137tests_Init(int pass, struct __vmData__ *__pRT__, OBJ snd);
+
+
+
+void _libstx_libwidg_tests_InitDefinition(int pass, struct __vmData__ *__pRT__, OBJ snd)
+{
+ __BEGIN_PACKAGE2__("libstx_libwidg_tests__DFN", _libstx_libwidg_tests_InitDefinition, "stx:libwidg/tests");
+ _stx_137libwidg_137tests_Init(pass,__pRT__,snd);
+
+ __END_PACKAGE__();
+}
+
+void _libstx_libwidg_tests_Init(int pass, struct __vmData__ *__pRT__, OBJ snd)
+{
+ __BEGIN_PACKAGE2__("libstx_libwidg_tests", _libstx_libwidg_tests_Init, "stx:libwidg/tests");
+ _EditFieldTests_Init(pass,__pRT__,snd);
+ _stx_137libwidg_137tests_Init(pass,__pRT__,snd);
+
+
+ __END_PACKAGE__();
+}
--- a/tests/mingwmake.bat Tue Mar 19 15:13:59 2019 +0000
+++ b/tests/mingwmake.bat Thu Mar 21 11:09:23 2019 +0000
@@ -1,16 +1,18 @@
-@REM -------
-@REM make using mingw gnu compiler
-@REM type mingwmake, and wait...
-@REM do not edit - automatically generated from ProjectDefinition
-@REM -------
-@SET DEFINES=
-@REM Kludge got Mercurial, cannot be implemented in Borland make
-@FOR /F "tokens=*" %%i in ('hg root') do SET HGROOT=%%i
-@IF "%HGROOT%" NEQ "" SET DEFINES=%DEFINES% "-DHGROOT=%HGROOT%"
-
-@pushd ..\..\rules
-@call find_mingw.bat
-@popd
-make.exe -N -f bc.mak %DEFINES% %USEMINGW_ARG% %*
-
-
+@REM -------
+@REM make using mingw gnu compiler
+@REM type mingwmake, and wait...
+@REM do not edit - automatically generated from ProjectDefinition
+@REM -------
+@SET DEFINES=
+@REM Kludge got Mercurial, cannot be implemented in Borland make
+@FOR /F "tokens=*" %%i in ('hg root') do SET HGROOT=%%i
+@IF "%HGROOT%" NEQ "" SET DEFINES=%DEFINES% "-DHGROOT=%HGROOT%"
+
+@pushd ..\..\rules
+@call find_mingw.bat
+@popd
+make.exe -N -f bc.mak %DEFINES% %USEMINGW_ARG% %*
+
+
+
+
--- a/tests/stx_libwidg_tests.st Tue Mar 19 15:13:59 2019 +0000
+++ b/tests/stx_libwidg_tests.st Thu Mar 21 11:09:23 2019 +0000
@@ -55,11 +55,11 @@
are extended by myself.
They are mandatory, because we need these packages as a prerequisite for loading and compiling.
This method is generated automatically,
- by searching along the inheritance chain of all of my classes."
+ by searching along the inheritance chain of all of my classes.
+ Please take a look at the #referencedPreRequisites method as well."
^ #(
- #'stx:goodies/smallsense' "SmallSense::AbstractTestCase - superclass of EditTextViewTests"
- #'stx:goodies/sunit' "TestAsserter - superclass of EditTextViewTests"
+ #'stx:goodies/sunit' "TestAsserter - superclass of EditFieldTests"
#'stx:libbasic' "LibraryDefinition - superclass of stx_libwidg_tests"
)
!
@@ -67,16 +67,17 @@
referencedPreRequisites
"list packages which are a prerequisite, because they contain
classes which are referenced by my classes.
- We do not need these packages as a prerequisite for compiling or loading,
+ These packages are NOT needed as a prerequisite for compiling or loading,
however, a class from it may be referenced during execution and having it
unloaded then may lead to a runtime doesNotUnderstand error, unless the caller
includes explicit checks for the package being present.
This method is generated automatically,
- by searching all classes (and their packages) which are referenced by my classes."
+ by searching all classes (and their packages) which are referenced by my classes.
+ Please also take a look at the #mandatoryPreRequisites method"
^ #(
- #'stx:libview' "StandardSystemView - referenced by EditTextViewTests>>setUp"
- #'stx:libwidg' "EditTextView - referenced by EditTextViewTests>>setUp"
+ #'stx:libview' "Image - referenced by EditFieldTests>>test_issue_261a"
+ #'stx:libwidg' "EditField - referenced by EditFieldTests>>setUp"
)
!
@@ -100,14 +101,17 @@
^ #(
"<className> or (<className> attributes...) in load order"
+ EditFieldTests
+ #'stx_libwidg_tests'
(EditTextViewTests autoload)
- #'stx_libwidg_tests'
)
!
extensionMethodNames
- "list class/selector pairs of extensions.
- A correponding method with real names must be present in my concrete subclasses"
+ "lists the extension methods which are to be included in the project.
+ Entries are 2-element array literals, consisting of class-name and selector.
+ A correponding method with real names must be present in my concrete subclasses
+ if it has extensions."
^ #(
)
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/stx_libwidg_testsWINrc.rc Thu Mar 21 11:09:23 2019 +0000
@@ -0,0 +1,37 @@
+//
+// DO NOT EDIT
+// automagically generated from the projectDefinition: stx_libwidg_tests.
+//
+VS_VERSION_INFO VERSIONINFO
+ FILEVERSION 8,0,32767,32767
+ PRODUCTVERSION 8,0,99,0
+#if (__BORLANDC__)
+ FILEFLAGSMASK VS_FF_DEBUG | VS_FF_PRERELEASE
+ FILEFLAGS VS_FF_PRERELEASE | VS_FF_SPECIALBUILD
+ FILEOS VOS_NT_WINDOWS32
+ FILETYPE VFT_DLL
+ FILESUBTYPE VS_USER_DEFINED
+#endif
+
+BEGIN
+ BLOCK "StringFileInfo"
+ BEGIN
+ BLOCK "040904E4"
+ BEGIN
+ VALUE "CompanyName", "eXept Software AG\0"
+ VALUE "FileDescription", "Smalltalk/X Class library (LIB)\0"
+ VALUE "FileVersion", "8.0.32767.32767\0"
+ VALUE "InternalName", "stx:libwidg/tests\0"
+ VALUE "LegalCopyright", "Copyright Claus Gittinger 1988-2015\nCopyright eXept Software AG 1998-2015\0"
+ VALUE "ProductName", "Smalltalk/X\0"
+ VALUE "ProductVersion", "8.0.99.0\0"
+ VALUE "ProductDate", "Thu, 21 Mar 2019 11:08:23 GMT\0"
+ END
+
+ END
+
+ BLOCK "VarFileInfo"
+ BEGIN // Language | Translation
+ VALUE "Translation", 0x409, 0x4E4 // U.S. English, Windows Multilingual
+ END
+END
--- a/tests/vcmake.bat Tue Mar 19 15:13:59 2019 +0000
+++ b/tests/vcmake.bat Thu Mar 21 11:09:23 2019 +0000
@@ -1,20 +1,22 @@
-@REM -------
-@REM make using Microsoft Visual C compiler
-@REM type vcmake, and wait...
-@REM do not edit - automatically generated from ProjectDefinition
-@REM -------
-
-@if not defined VSINSTALLDIR (
- pushd ..\..\rules
- call vcsetup.bat
- popd
-)
-@SET DEFINES=
-@REM Kludge got Mercurial, cannot be implemented in Borland make
-@FOR /F "tokens=*" %%i in ('hg root') do SET HGROOT=%%i
-@IF "%HGROOT%" NEQ "" SET DEFINES=%DEFINES% "-DHGROOT=%HGROOT%"
-make.exe -N -f bc.mak -DUSEVC=1 %DEFINES% %*
-
-
-
-
+@REM -------
+@REM make using Microsoft Visual C compiler
+@REM type vcmake, and wait...
+@REM do not edit - automatically generated from ProjectDefinition
+@REM -------
+
+@if not defined VSINSTALLDIR (
+ pushd ..\..\rules
+ call vcsetup.bat
+ popd
+)
+@SET DEFINES=
+@REM Kludge got Mercurial, cannot be implemented in Borland make
+@FOR /F "tokens=*" %%i in ('hg root') do SET HGROOT=%%i
+@IF "%HGROOT%" NEQ "" SET DEFINES=%DEFINES% "-DHGROOT=%HGROOT%"
+
+
+make.exe -N -f bc.mak -DUSEVC=1 %DEFINES% %*
+
+
+
+