PageRenderTime 22ms CodeModel.GetById 20ms app.highlight 1ms RepoModel.GetById 0ms app.codeStats 0ms

/src/test/scala/ExprToStringTest.scala

http://github.com/papamitra/scala-scheme
Scala | 28 lines | 13 code | 6 blank | 9 comment | 0 complexity | b6e72cf44e5bee363f9b0b46c274a43c MD5 | raw file
 1
 2package org.nagoyahackathon.scalalisp
 3
 4import org.scalatest.FunSuite
 5
 6
 7class ToStringTestSuite extends FunSuite{
 8  test("Number test"){
 9    assert(NumberExpr(3).toString === "3")
10  }
11
12  test("String test"){
13    assert(StringExpr("ABC").toString === "\"ABC\"")
14  }
15
16  test("Symbol test"){
17    assert(SymbolExpr("ABC").toString === "'ABC")
18  }
19/*
20  test("List test"){
21    assert(ListExpr(List(SymbolExpr("ABC"), NumberExpr(3))).toString === "('ABC, 3)")
22  }
23
24  test("List test2"){
25    assert(ListExpr(List(SymbolExpr("ABC"), NumberExpr(3), ListExpr(List(SymbolExpr("ABC"), NumberExpr(3))))).toString === "('ABC, 3, ('ABC, 3))")
26  }
27*/
28}