From 0e0f283e48ed4e0bbb79355b610ef2d025e86f9a Mon Sep 17 00:00:00 2001 From: Olly Betts Date: Fri, 22 Jul 2022 17:44:45 +1200 Subject: [PATCH] Fix friends_runme.* Most of these test D_d twice when they really should be testing D_d once and D_i once (the variable name is `di` and the values assigned are integers). This was wrong in the initial version for Python in 708021a809a566a410ec0e6bf5c63029392315e1 and it looks like subsequent additions for other languages have just copied that mistake. --- Examples/test-suite/csharp/friends_runme.cs | 2 +- Examples/test-suite/go/friends_runme.go | 8 ++++---- Examples/test-suite/java/friends_runme.java | 2 +- Examples/test-suite/octave/friends_runme.m | 2 +- Examples/test-suite/python/friends_runme.py | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Examples/test-suite/csharp/friends_runme.cs b/Examples/test-suite/csharp/friends_runme.cs index ae3ffb64f..9dfd9ba09 100644 --- a/Examples/test-suite/csharp/friends_runme.cs +++ b/Examples/test-suite/csharp/friends_runme.cs @@ -22,7 +22,7 @@ public class friends_runme { if (friends.mix(a,b) != 5) throw new Exception("failed"); - D_d di = new D_d(2); + D_i di = new D_i(2); D_d dd = new D_d(3.3); // incredible template overloading working just fine diff --git a/Examples/test-suite/go/friends_runme.go b/Examples/test-suite/go/friends_runme.go index b6b9e93f3..f7836ad2f 100644 --- a/Examples/test-suite/go/friends_runme.go +++ b/Examples/test-suite/go/friends_runme.go @@ -27,21 +27,21 @@ func main() { panic(0) } - di := friends.NewD_d(2) + di := friends.NewD_i(2) dd := friends.NewD_d(3.3) // incredible template overloading working just fine - if friends.Get_val1(di).(float64) != 2 { + if friends.Get_val1(di).(int) != 2 { panic(0) } if friends.Get_val1(dd).(float64) != 3.3 { panic(0) } - friends.Set(di, 4.0) + friends.Set(di, 4) friends.Set(dd, 1.3) - if friends.Get_val1(di).(float64) != 4 { + if friends.Get_val1(di).(int) != 4 { panic(0) } if friends.Get_val1(dd).(float64) != 1.3 { diff --git a/Examples/test-suite/java/friends_runme.java b/Examples/test-suite/java/friends_runme.java index 2dced9efa..ebec103c1 100644 --- a/Examples/test-suite/java/friends_runme.java +++ b/Examples/test-suite/java/friends_runme.java @@ -32,7 +32,7 @@ public class friends_runme { if (friends.mix(a,b) != 5) throw new RuntimeException("failed"); - D_d di = new D_d(2); + D_i di = new D_i(2); D_d dd = new D_d(3.3); // incredible template overloading working just fine diff --git a/Examples/test-suite/octave/friends_runme.m b/Examples/test-suite/octave/friends_runme.m index 50a5b20ef..163f05b8d 100644 --- a/Examples/test-suite/octave/friends_runme.m +++ b/Examples/test-suite/octave/friends_runme.m @@ -29,7 +29,7 @@ if (friends.mix(a,b) != 5) error("failed"); endif -di = friends.D_d(2); +di = friends.D_i(2); dd = friends.D_d(3.3); # incredible template overloading working just fine diff --git a/Examples/test-suite/python/friends_runme.py b/Examples/test-suite/python/friends_runme.py index 2d377fdd1..7c7bbabfe 100644 --- a/Examples/test-suite/python/friends_runme.py +++ b/Examples/test-suite/python/friends_runme.py @@ -19,7 +19,7 @@ b = friends.B(3) if friends.mix(a, b) != 5: raise RuntimeError -di = friends.D_d(2) +di = friends.D_i(2) dd = friends.D_d(3.3) # incredible template overloading working just fine