From 913a5569abcde93fd8b5f94863678d1ae6d8e781 Mon Sep 17 00:00:00 2001 From: Alexander Aksenov Date: Mon, 13 Aug 2018 16:08:18 +0300 Subject: [PATCH] Tests: updated ValueTest for decimal values Signed-off-by: Alexander Aksenov --- tests/ValuesTest/ValuesTest.cs | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/tests/ValuesTest/ValuesTest.cs b/tests/ValuesTest/ValuesTest.cs index e1275ca..5aaabfe 100644 --- a/tests/ValuesTest/ValuesTest.cs +++ b/tests/ValuesTest/ValuesTest.cs @@ -22,6 +22,8 @@ namespace values static void Main(string[] args) { // //@START@ decimal d = 12345678901234567890123456m; + decimal long_zero_dec = 0.00000000000000000017M; + decimal short_zero_dec = 0.17M; int x = 1; // //@BREAK@ /* r = Expect("*stopped"); @@ -34,12 +36,20 @@ Assert.Equal("12345678901234567890123456", r.FindString("value")); Assert.Equal("d", r.FindString("exp")); Assert.Equal("0", r.FindString("numchild")); Assert.Equal("decimal", r.FindString("type")); + +Send(String.Format("7-var-create 8 * \"{0}\"", "long_zero_dec")); +r = Expect("7^done"); +Assert.Equal("0.00000000000000000017", r.FindString("value")); + +Send(String.Format("8-var-create 8 * \"{0}\"", "short_zero_dec")); +r = Expect("8^done"); +Assert.Equal("0.17", r.FindString("value")); */ } } } /* -Send("7-exec-continue"); +Send("9-exec-continue"); r = Expect("*stopped"); Assert.Equal("exited", r.FindString("reason")); */ -- 2.7.4