fix unit tests
authorMorgan Deters <mdeters@gmail.com>
Sat, 29 Oct 2011 08:11:12 +0000 (08:11 +0000)
committerMorgan Deters <mdeters@gmail.com>
Sat, 29 Oct 2011 08:11:12 +0000 (08:11 +0000)
src/expr/node_value.cpp

index f1fade69de5854d6333b1151d1ba919cc9216321..89ac7ffca4d33fa66e8d8ec802c5d59d30f5d538 100644 (file)
@@ -39,7 +39,11 @@ NodeValue NodeValue::s_null(0);
 
 string NodeValue::toString() const {
   stringstream ss;
-  toStream(ss, -1, false, Options::current()->outputLanguage);
+  OutputLanguage outputLanguage = (this == &s_null) ? language::output::LANG_AST : Options::current()->outputLanguage;
+  toStream(ss, -1, false,
+           outputLanguage == language::output::LANG_AUTO ?
+             language::output::LANG_AST :
+             outputLanguage);
   return ss.str();
 }