From fd6ea75a0e35fa7f55ffd06a9f5c36cea91df8ea Mon Sep 17 00:00:00 2001
From: Giovanni Bussi <giovanni.bussi@gmail.com>
Date: Mon, 17 Dec 2018 12:50:56 +0100
Subject: [PATCH] Added regtest for Communicator:: Min Max Prod

---
 regtest/basic/rt-make-2/main.cpp          | 12 ++++++++++++
 regtest/basic/rt-make-2/output0.reference |  3 +++
 regtest/basic/rt-make-2/output1.reference |  3 +++
 regtest/basic/rt-make-2/output2.reference |  3 +++
 4 files changed, 21 insertions(+)

diff --git a/regtest/basic/rt-make-2/main.cpp b/regtest/basic/rt-make-2/main.cpp
index 675677328..55e837c0f 100644
--- a/regtest/basic/rt-make-2/main.cpp
+++ b/regtest/basic/rt-make-2/main.cpp
@@ -38,6 +38,18 @@ void run(Communicator& comm){
   comm.Sum(&a[0],a.size());
   dump(comm,ofs,a);
 
+  reset(comm,a);
+  comm.Prod(&a[0],a.size());
+  dump(comm,ofs,a);
+
+  reset(comm,a);
+  comm.Max(&a[0],a.size());
+  dump(comm,ofs,a);
+
+  reset(comm,a);
+  comm.Min(&a[0],a.size());
+  dump(comm,ofs,a);
+
   reset(comm,a);
   comm.Bcast(&a[0],a.size(),0);
   dump(comm,ofs,a);
diff --git a/regtest/basic/rt-make-2/output0.reference b/regtest/basic/rt-make-2/output0.reference
index daae14a3e..226b01927 100644
--- a/regtest/basic/rt-make-2/output0.reference
+++ b/regtest/basic/rt-make-2/output0.reference
@@ -1,5 +1,8 @@
 1
  6 12 18 24 30 36 42 48 54 60 66 72
+ 6 48 162 384 750 1296 2058 3072 4374 6000 7986 10368
+ 3 6 9 12 15 18 21 24 27 30 33 36
+ 1 2 3 4 5 6 7 8 9 10 11 12
  1 2 3 4 5 6 7 8 9 10 11 12
  3 6 9 12 15 18 21 24 27 30 33 36
  1 2 3 4 5 6 7 8 9 10 11 12
diff --git a/regtest/basic/rt-make-2/output1.reference b/regtest/basic/rt-make-2/output1.reference
index 02f889b5f..246821fb9 100644
--- a/regtest/basic/rt-make-2/output1.reference
+++ b/regtest/basic/rt-make-2/output1.reference
@@ -1,5 +1,8 @@
 1
  6 12 18 24 30 36 42 48 54 60 66 72
+ 6 48 162 384 750 1296 2058 3072 4374 6000 7986 10368
+ 3 6 9 12 15 18 21 24 27 30 33 36
+ 1 2 3 4 5 6 7 8 9 10 11 12
  1 2 3 4 5 6 7 8 9 10 11 12
  3 6 9 12 15 18 21 24 27 30 33 36
  2 4 6 8 10 12 14 16 18 20 22 24
diff --git a/regtest/basic/rt-make-2/output2.reference b/regtest/basic/rt-make-2/output2.reference
index 2baff966c..7edf3e8be 100644
--- a/regtest/basic/rt-make-2/output2.reference
+++ b/regtest/basic/rt-make-2/output2.reference
@@ -1,5 +1,8 @@
 1
  6 12 18 24 30 36 42 48 54 60 66 72
+ 6 48 162 384 750 1296 2058 3072 4374 6000 7986 10368
+ 3 6 9 12 15 18 21 24 27 30 33 36
+ 1 2 3 4 5 6 7 8 9 10 11 12
  1 2 3 4 5 6 7 8 9 10 11 12
  3 6 9 12 15 18 21 24 27 30 33 36
  3 6 9 12 15 18 21 24 27 30 33 36
-- 
GitLab