diff --git a/collects/scribblings/drscheme/interface-ref.scrbl b/collects/scribblings/drscheme/interface-ref.scrbl index 45e612b03f..862bc23223 100644 --- a/collects/scribblings/drscheme/interface-ref.scrbl +++ b/collects/scribblings/drscheme/interface-ref.scrbl @@ -357,6 +357,27 @@ background that signals the source location of an error.} @; ---------------------------------------- +@subsection[#:tag "menu:testing"]{@onscreen{Testing}} + +This menu is visible when in a language with built-in support for testing; +presently this includes the @|HtDP| languages and the ProfessorJ languages. + +@itemize{ + @item{@defmenuitem{Enable tests} Allows tests written in the definitions + window to be evaluated when the program is run.} + @item{@defmenuitem{Disable tests} Stops tests written in the definitions + window from evaluating when the program is run; disabling tests freezes + contents of any existing test report window.} + @item{@defmenuitem{Dock report} Like the dock button on the test report + window, this causes all test report windows to merge with the appropriate + DrScheme window at the bottom of the frame.} + @item{@defmenuitem{Undock report} Like the undock button on the test report + window, this causes the test reports attached to appropriate DrScheme tabs + to become separate windows.} + } + +@; ---------------------------------------- + @subsection{@onscreen{Windows}} @itemize{ diff --git a/collects/scribblings/drscheme/languages.scrbl b/collects/scribblings/drscheme/languages.scrbl index d7545f8896..11cced047e 100644 --- a/collects/scribblings/drscheme/languages.scrbl +++ b/collects/scribblings/drscheme/languages.scrbl @@ -95,7 +95,7 @@ Five of DrScheme's languages are specifically designed for teaching: } -The teaching languages different from conventional Scheme in a number +The teaching languages are different from conventional Scheme in a number of ways: @itemize{ @@ -295,11 +295,78 @@ language through the detail section of language-selection dialog. } +A program in the teaching languages should be tested using the check forms -- + @scheme{(check-expect value value)}, @scheme{(check-within value value value)}, or + @scheme{(check-error value string)}. Tests are evaluated when running the program: + when there are no tests, a warning appears in the interactions window; + when all tests succeed, an acknowledgement appears in the interactions window; + otherwise, a testing window appears to report the results. See @secref["menu:testing"] + for details on configuring the report behavior. + @; ---------------------------------------- @section[#:tag "profj"]{ProfessorJ} -... +The ProfessorJ languages are Java based languages designed for teaching and + experimentation. There are four teaching based languages: + +@itemize{ + + @item{The @as-index{@drlang{ProfessorJ Beginner} language} is a small + subset of Java, designed for novice computer science students. + Each class must contain a constructor that initializes the class's + fields; each method must return a value.} + + @item{The @as-index{@drlang{ProfessorJ Intermediate} language} is an extension to + ProfessorJ Beginner that adds full class-based inheritance and mutation. + Classes do not require constructors and null values may arise.} + + @item{The @as-index{@drlang{ProfessorJ Intermediate + access} language} adds + access controls, such as public or private, to member definitions and + supports overloading constructor definitions.} + + @item{The @as-index{@drlang{ProfessorJ Advanced} language} adds arrays, loop + constructs, and package specifications.} + +} + +The remaining two languages support language extensions and experimentations: + +@itemize{ + @item{The @as-index{@drlang{ProfessorJ Full} language} supports most of Java 1.1 + features, as well as a set of constructs designed for the development of + unit tests} + @item{The @as-index{@drlang{ProfessorJ Java + dynamic} language} extends the + ProfessorJ Full language with a dynamic type and the ability to import Scheme + libraries directly, for developing programs that use both languages.} + } + +Value printing can be either @defterm{Class} or @defterm{Class + Field}, selectable + in the show details section of the language selection window. The Class printing style + only displays the class name for any object value. The Class + Field style displays + the class combined with the names and values for all of the class's fields; when displaying + a recursively defined object, any repeated object reverts to the Class style display for + the second appearance. Languages with arrays may opt to always display an entire array or + truncate the middle section of longer arrays. + +All of the ProfessorJ languages support testing extensions, and tests are required + within the teaching languages. The experimental languages, Full and Java + dynamic, + allow the removal of these forms within the language selection window. + +Programs in the teaching languages must be tested, using a class containing the word + 'Example' in the name and the 'check ... expect ...' comparison forms. On run, + all Example classes are instanstiated and all methods prefixed with the word 'test' + are run. When there are no tests, a warning appears in the interactions window; + when all tests succeed, an acknowledgement appears in the interactions window; + otherwise, a testing window appears to report the results. See @secref["menu:testing"] + for details on configuring the report behavior. + +Unless disabled in the language configuration window, expression-level coverage + information is collected during testing. Selecting the buttons within the report + modifies the color of the program in the definitions window, to distinguish + expressions that were used in the test from those that were not. Typing into the + definitions window restores the original coloring. + @; ----------------------------------------