Call CalculatorInterface::CalculateString even for x86 Android testing
With this CL, CalculatorInterface::CalculateString is called just as a smoke test.
This is just a clean-up of unittest. Hence no behavior change is intended.
BUG=none
TEST=compile
git-svn-id: https://mozc.googlecode.com/svn/trunk@480 a6090854-d499-a067-5803-1114d4e51264
diff --git a/src/mozc_version_template.txt b/src/mozc_version_template.txt
index d31c95d..b4c777b 100644
--- a/src/mozc_version_template.txt
+++ b/src/mozc_version_template.txt
@@ -1,6 +1,6 @@
MAJOR=2
MINOR=16
-BUILD=2013
+BUILD=2014
REVISION=102
# NACL_DICTIONARY_VERSION is the target version of the system dictionary to be
# downloaded by NaCl Mozc.
diff --git a/src/rewriter/calculator/calculator_test.cc b/src/rewriter/calculator/calculator_test.cc
index 628d6a0..092f8b1 100644
--- a/src/rewriter/calculator/calculator_test.cc
+++ b/src/rewriter/calculator/calculator_test.cc
@@ -167,13 +167,13 @@
const size_t query_length = index_of_equal + 1;
const string query(line, 0, query_length);
-#if defined(OS_ANDROID) && defined(__i386__)
- // StressTest seems to be overkill. Many false-positives makes maintainance
- // harder.
- // So it might be better to use this test case as "smoke test".
- // But for now we do it only for x86 Android, which faces test failure.
- RunCalculation(calculator, query);
-#else // OS_ANDROID && __i386__
+ // Smoke test.
+ // If (OS_ANDROID && x86) the result differs from expectation
+ // because of floating point specification so on such environment
+ // Following verification is skipped.
+ string unused_result;
+ calculator->CalculateString(query, &unused_result);
+#if !defined(OS_ANDROID) || !defined(__i386__)
if (line.size() == query_length) {
// False test
VerifyRejection(calculator, line);
@@ -181,7 +181,7 @@
}
const string answer(line, query_length);
VerifyCalculation(calculator, query, answer);
-#endif // OS_ANDROID && __i386__
+#endif // !defined(OS_ANDROID) || !defined(__i386__)
}
LOG(INFO) << "done " << lineno << " tests from " << filename << endl;
}