[recipes] Add more number test cases



commit ade10413e729fd031c2648260d3cb97ee964f966
Author: Matthias Clasen <mclasen redhat com>
Date:   Wed Jul 12 20:44:49 2017 -0400

    Add more number test cases
    
    This covers all the fractions that we allow as rational approximations.

 tests/number-data/number1.expected |  355 ++++++++++++++++++++++++++++++++++++
 tests/number-data/number1.in       |   73 ++++++++
 2 files changed, 428 insertions(+), 0 deletions(-)
---
diff --git a/tests/number-data/number1.expected b/tests/number-data/number1.expected
index c9ed4e2..ec4c9d1 100644
--- a/tests/number-data/number1.expected
+++ b/tests/number-data/number1.expected
@@ -148,6 +148,361 @@ REST ''
 VALUE 0.875
 FORMATTED '⅞'
 
+INPUT '1/16'
+REST ''
+VALUE 0.0625
+FORMATTED '¹⁄₁₆'
+
+INPUT '2/16'
+REST ''
+VALUE 0.125
+FORMATTED '⅛'
+
+INPUT '3/16'
+REST ''
+VALUE 0.1875
+FORMATTED '³⁄₁₆'
+
+INPUT '4/16'
+REST ''
+VALUE 0.25
+FORMATTED '¼'
+
+INPUT '5/16'
+REST ''
+VALUE 0.3125
+FORMATTED '⁵⁄₁₆'
+
+INPUT '6/16'
+REST ''
+VALUE 0.375
+FORMATTED '⅜'
+
+INPUT '7/16'
+REST ''
+VALUE 0.4375
+FORMATTED '⁷⁄₁₆'
+
+INPUT '8/16'
+REST ''
+VALUE 0.5
+FORMATTED '½'
+
+INPUT '9/16'
+REST ''
+VALUE 0.5625
+FORMATTED '⁹⁄₁₆'
+
+INPUT '10/16'
+REST ''
+VALUE 0.625
+FORMATTED '⅝'
+
+INPUT '11/16'
+REST ''
+VALUE 0.6875
+FORMATTED '¹¹⁄₁₆'
+
+INPUT '12/16'
+REST ''
+VALUE 0.75
+FORMATTED '¾'
+
+INPUT '13/16'
+REST ''
+VALUE 0.8125
+FORMATTED '¹³⁄₁₆'
+
+INPUT '14/16'
+REST ''
+VALUE 0.875
+FORMATTED '⅞'
+
+INPUT '15/16'
+REST ''
+VALUE 0.9375
+FORMATTED '¹⁵⁄₁₆'
+
+INPUT '1/15'
+REST ''
+VALUE 0.0666667
+FORMATTED '¹⁄₁₅'
+
+INPUT '2/15'
+REST ''
+VALUE 0.133333
+FORMATTED '²⁄₁₅'
+
+INPUT '3/15'
+REST ''
+VALUE 0.2
+FORMATTED '⅕'
+
+INPUT '4/15'
+REST ''
+VALUE 0.266667
+FORMATTED '⁴⁄₁₅'
+
+INPUT '5/15'
+REST ''
+VALUE 0.333333
+FORMATTED '⅓'
+
+INPUT '6/15'
+REST ''
+VALUE 0.4
+FORMATTED '⅖'
+
+INPUT '7/15'
+REST ''
+VALUE 0.466667
+FORMATTED '⁷⁄₁₅'
+
+INPUT '8/15'
+REST ''
+VALUE 0.533333
+FORMATTED '⁸⁄₁₅'
+
+INPUT '9/15'
+REST ''
+VALUE 0.6
+FORMATTED '⅗'
+
+INPUT '10/15'
+REST ''
+VALUE 0.666667
+FORMATTED '⅔'
+
+INPUT '11/15'
+REST ''
+VALUE 0.733333
+FORMATTED '¹¹⁄₁₅'
+
+INPUT '12/15'
+REST ''
+VALUE 0.8
+FORMATTED '⅘'
+
+INPUT '13/15'
+REST ''
+VALUE 0.866667
+FORMATTED '¹³⁄₁₅'
+
+INPUT '14/15'
+REST ''
+VALUE 0.933333
+FORMATTED '¹⁴⁄₁₅'
+
+INPUT '1/12'
+REST ''
+VALUE 0.0833333
+FORMATTED '¹⁄₁₂'
+
+INPUT '2/12'
+REST ''
+VALUE 0.166667
+FORMATTED '⅙'
+
+INPUT '3/12'
+REST ''
+VALUE 0.25
+FORMATTED '¼'
+
+INPUT '4/12'
+REST ''
+VALUE 0.333333
+FORMATTED '⅓'
+
+INPUT '5/12'
+REST ''
+VALUE 0.416667
+FORMATTED '⁵⁄₁₂'
+
+INPUT '6/12'
+REST ''
+VALUE 0.5
+FORMATTED '½'
+
+INPUT '7/12'
+REST ''
+VALUE 0.583333
+FORMATTED '⁷⁄₁₂'
+
+INPUT '8/12'
+REST ''
+VALUE 0.666667
+FORMATTED '⅔'
+
+INPUT '9/12'
+REST ''
+VALUE 0.75
+FORMATTED '¾'
+
+INPUT '10/12'
+REST ''
+VALUE 0.833333
+FORMATTED '⅚'
+
+INPUT '11/12'
+REST ''
+VALUE 0.916667
+FORMATTED '¹¹⁄₁₂'
+
+INPUT '1/10'
+REST ''
+VALUE 0.1
+FORMATTED '⅒'
+
+INPUT '2/10'
+REST ''
+VALUE 0.2
+FORMATTED '⅕'
+
+INPUT '3/10'
+REST ''
+VALUE 0.3
+FORMATTED '³⁄₁₀'
+
+INPUT '4/10'
+REST ''
+VALUE 0.4
+FORMATTED '⅖'
+
+INPUT '5/10'
+REST ''
+VALUE 0.5
+FORMATTED '½'
+
+INPUT '6/10'
+REST ''
+VALUE 0.6
+FORMATTED '⅗'
+
+INPUT '7/10'
+REST ''
+VALUE 0.7
+FORMATTED '⁷⁄₁₀'
+
+INPUT '8/10'
+REST ''
+VALUE 0.8
+FORMATTED '⅘'
+
+INPUT '9/10'
+REST ''
+VALUE 0.9
+FORMATTED '⁹⁄₁₀'
+
+INPUT '1/8'
+REST ''
+VALUE 0.125
+FORMATTED '⅛'
+
+INPUT '2/8'
+REST ''
+VALUE 0.25
+FORMATTED '¼'
+
+INPUT '3/8'
+REST ''
+VALUE 0.375
+FORMATTED '⅜'
+
+INPUT '4/8'
+REST ''
+VALUE 0.5
+FORMATTED '½'
+
+INPUT '5/8'
+REST ''
+VALUE 0.625
+FORMATTED '⅝'
+
+INPUT '6/8'
+REST ''
+VALUE 0.75
+FORMATTED '¾'
+
+INPUT '7/8'
+REST ''
+VALUE 0.875
+FORMATTED '⅞'
+
+INPUT '1/6'
+REST ''
+VALUE 0.166667
+FORMATTED '⅙'
+
+INPUT '2/6'
+REST ''
+VALUE 0.333333
+FORMATTED '⅓'
+
+INPUT '3/6'
+REST ''
+VALUE 0.5
+FORMATTED '½'
+
+INPUT '4/6'
+REST ''
+VALUE 0.666667
+FORMATTED '⅔'
+
+INPUT '5/6'
+REST ''
+VALUE 0.833333
+FORMATTED '⅚'
+
+INPUT '1/5'
+REST ''
+VALUE 0.2
+FORMATTED '⅕'
+
+INPUT '2/5'
+REST ''
+VALUE 0.4
+FORMATTED '⅖'
+
+INPUT '3/5'
+REST ''
+VALUE 0.6
+FORMATTED '⅗'
+
+INPUT '4/5'
+REST ''
+VALUE 0.8
+FORMATTED '⅘'
+
+INPUT '1/4'
+REST ''
+VALUE 0.25
+FORMATTED '¼'
+
+INPUT '2/4'
+REST ''
+VALUE 0.5
+FORMATTED '½'
+
+INPUT '3/4'
+REST ''
+VALUE 0.75
+FORMATTED '¾'
+
+INPUT '1/3'
+REST ''
+VALUE 0.333333
+FORMATTED '⅓'
+
+INPUT '2/3'
+REST ''
+VALUE 0.666667
+FORMATTED '⅔'
+
+INPUT '1/2'
+REST ''
+VALUE 0.5
+FORMATTED '½'
+
 INPUT '1 1/2'
 REST ''
 VALUE 1.5
diff --git a/tests/number-data/number1.in b/tests/number-data/number1.in
index eaf2290..2594f67 100644
--- a/tests/number-data/number1.in
+++ b/tests/number-data/number1.in
@@ -32,6 +32,79 @@
 ⅝
 ⅞
 
+# our nice fractions
+1/16
+2/16
+3/16
+4/16
+5/16
+6/16
+7/16
+8/16
+9/16
+10/16
+11/16
+12/16
+13/16
+14/16
+15/16
+1/15
+2/15
+3/15
+4/15
+5/15
+6/15
+7/15
+8/15
+9/15
+10/15
+11/15
+12/15
+13/15
+14/15
+1/12
+2/12
+3/12
+4/12
+5/12
+6/12
+7/12
+8/12
+9/12
+10/12
+11/12
+1/10
+2/10
+3/10
+4/10
+5/10
+6/10
+7/10
+8/10
+9/10
+1/8
+2/8
+3/8
+4/8
+5/8
+6/8
+7/8
+1/6
+2/6
+3/6
+4/6
+5/6
+1/5
+2/5
+3/5
+4/5
+1/4
+2/4
+3/4
+1/3
+2/3
+1/2
+
 # mixed numbers
 1 1/2
 2 23/47


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]