Page 257 (PDF page 297):
Listing 14.3, and all applicable listings below it in the chapter.
"import org.stairwaybook.layout.Element" needs to be added above "import
Element.elem" in order for the class to compile.
-- snip --
import org.scalatest.Suite
// import org.stairwaybook.layout.Element // Errata, added
import Element.elem
-- snip --
A simple test in the scala REPL to verify this:
scala> import org.scalatest.Suite
import org.scalatest.Suite
scala> import Element.elem
<console>:8: error: not found: value Element
import Element.elem
^
scala> import org.stairwaybook.layout.Element // Errata, added
import layout.Element
scala> import Element.elem // now Element can be found
import Element.elem
|
Page 263 (PDF page 303):
pg 303 pdf (chapter 14)
Output of "(new ElementSpec).execute()" near the bottom of the page:
"- should throw an IAE if passed a negative width" should read:
- should throw an IAE if passed a negative width *** FAILED ***
Expected exception java.lang.IllegalArgumentException to be thrown, but
no exception was thrown.
Spiral.scala will compile with "def verticalBar = elem('|', -2,
sp.height)". However, the spiral will then be missing some sides. This is
actually a good example of a test that reveals a bug in the code.
|