URL:
https://svn.lrde.epita.fr/svn/scool/trunk
ChangeLog:
2008-03-12 Maxime van Noppen <yabo(a)lrde.epita.fr>
Update tests regarding to the Olena to Milena switch
* mouline.sh: Add summary feature.
* transformer/command: Exit with the good exit value.
* transformer/class_decl_1.ref,
* transformer/class_decl_2.ref,
* transformer/class_decl_3.ref,
* transformer/class_decl_inh.ref,
* transformer/class_decl_inh_abst.ref,
* transformer/class_decl_inh_fin.ref,
* transformer/class_members_1.ref,
* transformer/class_predecl.ref,
* transformer/class_predecl_inh.ref,
* transformer/class_template_1.ref,
* transformer/class_template_2.ref,
* transformer/cons_decl_1.ref,
* transformer/cons_decl_2.ref,
* transformer/empty.ref,
* transformer/function_decl_1.ref,
* transformer/function_decl_10.ref,
* transformer/function_decl_3.ref,
* transformer/function_decl_4.ref,
* transformer/function_decl_5.ref,
* transformer/function_decl_6.ref,
* transformer/function_decl_7.ref,
* transformer/function_decl_8.ref,
* transformer/function_decl_9.ref,
* transformer/function_return_1.ref,
* transformer/function_return_2.ref,
* transformer/function_return_3.ref,
* transformer/sample_1.ref,
* transformer/sample_3.ref,
* transformer/sample_4.ref,
* transformer/var_decl_1.ref,
* transformer/var_decl_2.ref,
* transformer/var_decl_3.ref,
* transformer/var_decl_5.ref,
* transformer/var_decl_6.ref: Update ref.
mouline.sh | 28 +++++++++++++++++++++++++++-
transformer/class_decl_1.ref | 9 ++-------
transformer/class_decl_2.ref | 9 ++-------
transformer/class_decl_3.ref | 9 ++-------
transformer/class_decl_inh.ref | 15 ++++-----------
transformer/class_decl_inh_abst.ref | 13 ++++---------
transformer/class_decl_inh_fin.ref | 19 +++++--------------
transformer/class_members_1.ref | 9 ++-------
transformer/class_predecl.ref | 5 +----
transformer/class_predecl_inh.ref | 3 ---
transformer/class_template_1.ref | 3 ---
transformer/class_template_2.ref | 3 ---
transformer/command | 25 +++++++++++++++++++------
transformer/cons_decl_1.ref | 3 ---
transformer/cons_decl_2.ref | 3 ---
transformer/empty.ref | 3 +--
transformer/function_decl_1.ref | 3 ---
transformer/function_decl_10.ref | 3 ---
transformer/function_decl_3.ref | 3 ---
transformer/function_decl_4.ref | 3 ---
transformer/function_decl_5.ref | 3 ---
transformer/function_decl_6.ref | 3 ---
transformer/function_decl_7.ref | 3 ---
transformer/function_decl_8.ref | 3 ---
transformer/function_decl_9.ref | 3 ---
transformer/function_return_1.ref | 3 ---
transformer/function_return_2.ref | 3 ---
transformer/function_return_3.ref | 3 ---
transformer/sample_1.ref | 3 ---
transformer/sample_3.ref | 3 ---
transformer/sample_4.ref | 5 +----
transformer/var_decl_1.ref | 3 ---
transformer/var_decl_2.ref | 3 ---
transformer/var_decl_3.ref | 3 ---
transformer/var_decl_5.ref | 3 ---
transformer/var_decl_6.ref | 3 ---
36 files changed, 70 insertions(+), 151 deletions(-)
Index: trunk/tests/mouline.sh
===================================================================
--- trunk/tests/mouline.sh (revision 50)
+++ trunk/tests/mouline.sh (revision 51)
@@ -12,6 +12,10 @@
print_diff=0
gen_ref=0
+nb_pass=0
+nb_skip=0
+nb_fail=0
+
align ()
{
echo -e -n "\033[$1G"
@@ -36,14 +40,25 @@
if [ $gen_ref -eq 1 ]; then
$cmd $input > $ref
+ exit_val=$?
+ if [ $exit_val -ne 0 ]; then
+ echo -e "$bblue[$byell sk $bblue]"
+ nb_skip=$(($nb_skip + 1))
+ rm $ref
+ else
+ echo -e "$bblue[$bgreen ok $bblue]"
+ nb_pass=$(($nb_pass + 1))
+ fi
else
if [ -r $ref ]; then
cmd_log=`$cmd $input 2> /dev/null`
- diff_log=`printf "%s\n" "$cmd_log" | diff -u $ref -`
+ diff_log=`printf "%s\n" "$cmd_log" | diff -EwB -u $ref -`
if [ "$diff_log" = "" ]; then
echo -e "$bblue[$bgreen ok $bblue]"
+ nb_pass=$(($nb_pass + 1))
else
echo -e "$bblue[$bred ko $bblue]"
+ nb_fail=$(($nb_fail + 1))
if [ $print_diff -eq 1 ]; then
echo -e -n $red
echo "$diff_log"
@@ -53,6 +68,7 @@
else
echo -e "$bblue[$byell sk $bblue]"
echo -e -n $red
+ nb_skip=$(($nb_skip + 1))
fi
fi
}
@@ -112,3 +128,13 @@
done
fi
done
+
+echo
+echo -e $bblue "Summary :"
+echo -e $bgreen " - Passed : " $nb_pass
+echo -e $byell " - Skiped : " $nb_skip
+if [ $gen_ref -ne 1 ]; then
+ echo -e $bred " - Failed : " $nb_fail
+fi
+echo -e $bblue " ---------------"
+echo -e $bblue " Total : " $(($nb_pass + $nb_skip + $nb_fail))
Index: trunk/tests/transformer/sample_4.ref
===================================================================
--- trunk/tests/transformer/sample_4.ref (revision 50)
+++ trunk/tests/transformer/sample_4.ref (revision 51)
@@ -1,7 +1,4 @@
-#include <stc/any.hh>
-#include <stc/find_exact.hh>
-
float sqrt(float arg)
{
- return std::sqrt(arg);
+ return std::sqrt(arg)
}
Index: trunk/tests/transformer/function_return_1.ref
===================================================================
--- trunk/tests/transformer/function_return_1.ref (revision 50)
+++ trunk/tests/transformer/function_return_1.ref (revision 51)
@@ -1,6 +1,3 @@
-#include <stc/any.hh>
-#include <stc/find_exact.hh>
-
int answer()
{
return 42;
Index: trunk/tests/transformer/function_return_2.ref
===================================================================
--- trunk/tests/transformer/function_return_2.ref (revision 50)
+++ trunk/tests/transformer/function_return_2.ref (revision 51)
@@ -1,6 +1,3 @@
-#include <stc/any.hh>
-#include <stc/find_exact.hh>
-
int answer(int a, bool b)
{
return 42;
Index: trunk/tests/transformer/function_return_3.ref
===================================================================
--- trunk/tests/transformer/function_return_3.ref (revision 50)
+++ trunk/tests/transformer/function_return_3.ref (revision 51)
@@ -1,6 +1,3 @@
-#include <stc/any.hh>
-#include <stc/find_exact.hh>
-
int answer()
{
return 42;
Index: trunk/tests/transformer/cons_decl_1.ref
===================================================================
--- trunk/tests/transformer/cons_decl_1.ref (revision 50)
+++ trunk/tests/transformer/cons_decl_1.ref (revision 51)
@@ -1,4 +1 @@
-#include <stc/any.hh>
-#include <stc/find_exact.hh>
-
const int i;
Index: trunk/tests/transformer/cons_decl_2.ref
===================================================================
--- trunk/tests/transformer/cons_decl_2.ref (revision 50)
+++ trunk/tests/transformer/cons_decl_2.ref (revision 51)
@@ -1,4 +1 @@
-#include <stc/any.hh>
-#include <stc/find_exact.hh>
-
const int i = 3;
Index: trunk/tests/transformer/class_decl_1.ref
===================================================================
--- trunk/tests/transformer/class_decl_1.ref (revision 50)
+++ trunk/tests/transformer/class_decl_1.ref (revision 51)
@@ -1,11 +1,6 @@
-#include <stc/any.hh>
-#include <stc/find_exact.hh>
-
// Class Foo
-template < typename T >
-class Foo_: public stc::any<stc_find_exact(Foo_, T)>
+template < typename E >
+class Foo
{
};
-
-typedef Foo_<stc::itself> Foo;
Index: trunk/tests/transformer/class_decl_2.ref
===================================================================
--- trunk/tests/transformer/class_decl_2.ref (revision 50)
+++ trunk/tests/transformer/class_decl_2.ref (revision 51)
@@ -1,10 +1,7 @@
-#include <stc/any.hh>
-#include <stc/find_exact.hh>
-
// Class point
-template < typename T >
-class point_: public stc::any<stc_find_exact(point_, T)>
+template < typename E >
+class point
{
public:
int x()
@@ -16,5 +13,3 @@
int x;
int y;
};
-
-typedef point_<stc::itself> point;
Index: trunk/tests/transformer/class_decl_3.ref
===================================================================
--- trunk/tests/transformer/class_decl_3.ref (revision 50)
+++ trunk/tests/transformer/class_decl_3.ref (revision 51)
@@ -1,10 +1,7 @@
-#include <stc/any.hh>
-#include <stc/find_exact.hh>
-
// Class point
-template < typename T >
-class point_: public stc::any<stc_find_exact(point_, T)>
+template < typename E >
+class point
{
public:
int x()
@@ -16,5 +13,3 @@
int x;
int y;
};
-
-typedef point_<stc::itself> point;
Index: trunk/tests/transformer/class_template_1.ref
===================================================================
--- trunk/tests/transformer/class_template_1.ref (revision 50)
+++ trunk/tests/transformer/class_template_1.ref (revision 51)
@@ -1,6 +1,3 @@
-#include <stc/any.hh>
-#include <stc/find_exact.hh>
-
template < class T >
class A
{
Index: trunk/tests/transformer/class_template_2.ref
===================================================================
--- trunk/tests/transformer/class_template_2.ref (revision 50)
+++ trunk/tests/transformer/class_template_2.ref (revision 51)
@@ -1,6 +1,3 @@
-#include <stc/any.hh>
-#include <stc/find_exact.hh>
-
template < class T, bool B >
class A
{
Index: trunk/tests/transformer/class_decl_inh.ref
===================================================================
--- trunk/tests/transformer/class_decl_inh.ref (revision 50)
+++ trunk/tests/transformer/class_decl_inh.ref (revision 51)
@@ -1,19 +1,12 @@
-#include <stc/any.hh>
-#include <stc/find_exact.hh>
-
// Class Bar
-template < typename T >
-class Bar_: public stc::any<stc_find_exact(Bar_, T)>
+template < typename E >
+class Bar
{
};
-
-typedef Bar_<stc::itself> Bar;
// Class Foo
-template < typename T >
-class Foo_: public Bar_<stc_find_exact(Foo_, T)>
+template < typename E >
+class Foo: public Bar<E>
{
};
-
-typedef Foo_<stc::itself> Foo;
Index: trunk/tests/transformer/function_decl_1.ref
===================================================================
--- trunk/tests/transformer/function_decl_1.ref (revision 50)
+++ trunk/tests/transformer/function_decl_1.ref (revision 51)
@@ -1,6 +1,3 @@
-#include <stc/any.hh>
-#include <stc/find_exact.hh>
-
bool f(int a, int b)
{
}
Index: trunk/tests/transformer/function_decl_3.ref
===================================================================
--- trunk/tests/transformer/function_decl_3.ref (revision 50)
+++ trunk/tests/transformer/function_decl_3.ref (revision 51)
@@ -1,4 +1 @@
-#include <stc/any.hh>
-#include <stc/find_exact.hh>
-
void foo();
Index: trunk/tests/transformer/empty.ref
===================================================================
--- trunk/tests/transformer/empty.ref (revision 50)
+++ trunk/tests/transformer/empty.ref (revision 51)
@@ -1,2 +1 @@
-#include <stc/any.hh>
-#include <stc/find_exact.hh>
+
Index: trunk/tests/transformer/var_decl_1.ref
===================================================================
--- trunk/tests/transformer/var_decl_1.ref (revision 50)
+++ trunk/tests/transformer/var_decl_1.ref (revision 51)
@@ -1,4 +1 @@
-#include <stc/any.hh>
-#include <stc/find_exact.hh>
-
int i;
Index: trunk/tests/transformer/function_decl_4.ref
===================================================================
--- trunk/tests/transformer/function_decl_4.ref (revision 50)
+++ trunk/tests/transformer/function_decl_4.ref (revision 51)
@@ -1,6 +1,3 @@
-#include <stc/any.hh>
-#include <stc/find_exact.hh>
-
void foo();
float foo(int arg1);
char foo(const toto& arg1, double& arg2);
Index: trunk/tests/transformer/function_decl_5.ref
===================================================================
--- trunk/tests/transformer/function_decl_5.ref (revision 50)
+++ trunk/tests/transformer/function_decl_5.ref (revision 51)
@@ -1,6 +1,3 @@
-#include <stc/any.hh>
-#include <stc/find_exact.hh>
-
bool f(int a, int& b)
{
}
Index: trunk/tests/transformer/var_decl_2.ref
===================================================================
--- trunk/tests/transformer/var_decl_2.ref (revision 50)
+++ trunk/tests/transformer/var_decl_2.ref (revision 51)
@@ -1,4 +1 @@
-#include <stc/any.hh>
-#include <stc/find_exact.hh>
-
int i = 42;
Index: trunk/tests/transformer/function_decl_6.ref
===================================================================
--- trunk/tests/transformer/function_decl_6.ref (revision 50)
+++ trunk/tests/transformer/function_decl_6.ref (revision 51)
@@ -1,6 +1,3 @@
-#include <stc/any.hh>
-#include <stc/find_exact.hh>
-
template < class T >
void f()
{
Index: trunk/tests/transformer/var_decl_3.ref
===================================================================
--- trunk/tests/transformer/var_decl_3.ref (revision 50)
+++ trunk/tests/transformer/var_decl_3.ref (revision 51)
@@ -1,6 +1,3 @@
-#include <stc/any.hh>
-#include <stc/find_exact.hh>
-
const int answer = 42;
int i;
int j = i;
Index: trunk/tests/transformer/function_decl_7.ref
===================================================================
--- trunk/tests/transformer/function_decl_7.ref (revision 50)
+++ trunk/tests/transformer/function_decl_7.ref (revision 51)
@@ -1,6 +1,3 @@
-#include <stc/any.hh>
-#include <stc/find_exact.hh>
-
template < class T >
void f(int a)
{
Index: trunk/tests/transformer/function_decl_8.ref
===================================================================
--- trunk/tests/transformer/function_decl_8.ref (revision 50)
+++ trunk/tests/transformer/function_decl_8.ref (revision 51)
@@ -1,6 +1,3 @@
-#include <stc/any.hh>
-#include <stc/find_exact.hh>
-
template < class T >
void f(int a)
{
Index: trunk/tests/transformer/command
===================================================================
--- trunk/tests/transformer/command (revision 50)
+++ trunk/tests/transformer/command (revision 51)
@@ -44,6 +44,7 @@
transformer="$base/scoolt/scoolt"
printer="$base/pp-cxx/pp-cxx"
cxxprinter="abox2text"
+exitval=0
if [ $printsrc -eq 1 ]; then
echo "----[ cat $1 ]----"
@@ -55,31 +56,43 @@
then
echo '----[' $parser ']----'
tmp=`$parser`
- if [ $? -ne 0 ]; then exit $?; fi
+ exit_val=$?
+ if [ $exit_val -ne 0 ]; then exit $exit_val; fi
printf "%s\n" "$tmp" | pp-aterm
echo
echo '----[' $transformer ']----'
tmp=`printf "%s\n" "$tmp" | $transformer`
- if [ $? -ne 0 ]; then exit $?; fi
+ exit_val=$?
+ if [ $exit_val -ne 0 ]; then exit $exit_val; fi
printf "%s\n" "$tmp" | pp-aterm
echo
echo '----[' $printer ']----'
tmp=`printf "%s\n" "$tmp" | $printer`
- if [ $? -ne 0 ]; then exit $?; fi
+ exit_val=$?
+ if [ $exit_val -ne 0 ]; then exit $exit_val; fi
printf "%s\n" "$tmp"
echo
echo '---[' $cxxprinter ']----'
tmp=`printf "%s\n" "$tmp" | $cxxprinter`
- if [ $? -ne 0 ]; then exit $?; fi
+ exit_val=$?
+ if [ $exit_val -ne 0 ]; then exit $exit_val; fi
printf "%s\n" "$tmp"
echo
else
if [ $verb -eq 1 ]; then
- printf "%s\n" "`$parser | $transformer | $printer |
$cxxprinter`"
+ tmp=`$parser | $transformer | $printer | $cxxprinter`
+ exit_val=$?
+ if [ $exit_val -ne 0 ]; then exit $exit_val; fi
+ printf "%s\n" "$tmp"
else
- printf "%s\n" "`$parser 2> err-log | $transformer 2>> err-log
| $printer 2>> err-log | $cxxprinter 2>> err-log`"
+ tmp=`$parser 2> err-log | $transformer 2>> err-log | $printer 2>>
err-log | $cxxprinter 2>> err-log`
+ exit_val=$?
+ if [ $exit_val -ne 0 ]; then exit $exit_val; fi
+ printf "%s\n" "$tmp"
fi
fi
+
+exit $exitval
Index: trunk/tests/transformer/var_decl_5.ref
===================================================================
--- trunk/tests/transformer/var_decl_5.ref (revision 50)
+++ trunk/tests/transformer/var_decl_5.ref (revision 51)
@@ -1,4 +1 @@
-#include <stc/any.hh>
-#include <stc/find_exact.hh>
-
int a[42];
Index: trunk/tests/transformer/function_decl_9.ref
===================================================================
--- trunk/tests/transformer/function_decl_9.ref (revision 50)
+++ trunk/tests/transformer/function_decl_9.ref (revision 51)
@@ -1,6 +1,3 @@
-#include <stc/any.hh>
-#include <stc/find_exact.hh>
-
template < class T >
T f(const T& a)
{
Index: trunk/tests/transformer/var_decl_6.ref
===================================================================
--- trunk/tests/transformer/var_decl_6.ref (revision 50)
+++ trunk/tests/transformer/var_decl_6.ref (revision 51)
@@ -1,4 +1 @@
-#include <stc/any.hh>
-#include <stc/find_exact.hh>
-
std::vector<int> a;
Index: trunk/tests/transformer/function_decl_10.ref
===================================================================
--- trunk/tests/transformer/function_decl_10.ref (revision 50)
+++ trunk/tests/transformer/function_decl_10.ref (revision 51)
@@ -1,6 +1,3 @@
-#include <stc/any.hh>
-#include <stc/find_exact.hh>
-
double f(int a, double b)
{
return a + b;
Index: trunk/tests/transformer/class_decl_inh_fin.ref
===================================================================
--- trunk/tests/transformer/class_decl_inh_fin.ref (revision 50)
+++ trunk/tests/transformer/class_decl_inh_fin.ref (revision 51)
@@ -1,26 +1,17 @@
-#include <stc/any.hh>
-#include <stc/find_exact.hh>
-
// Class Animal
-template < typename T >
-class Animal_: public stc::any<stc_find_exact(Animal_, T)>
+template < typename E >
+class Animal
{
};
-
-typedef Animal_<stc::itself> Animal;
// Class Mammal
-template < typename T >
-class Mammal_: public Animal_<stc_find_exact(Mammal_, T)>
+template < typename E >
+class Mammal: public Animal<E>
{
};
-
-typedef Mammal_<stc::itself> Mammal;
// Class Monkey
-class Monkey: public Mammal_<Monkey>
+class Monkey: public Mammal<Monkey>
{
};
-
-typedef Monkey_<stc::itself> Monkey;
Index: trunk/tests/transformer/class_members_1.ref
===================================================================
--- trunk/tests/transformer/class_members_1.ref (revision 50)
+++ trunk/tests/transformer/class_members_1.ref (revision 51)
@@ -1,13 +1,8 @@
-#include <stc/any.hh>
-#include <stc/find_exact.hh>
-
// Class Student
-template < typename T >
-class Student_: public stc::any<stc_find_exact(Student_, T)>
+template < typename E >
+class Student
{
public:
int money;
};
-
-typedef Student_<stc::itself> Student;
Index: trunk/tests/transformer/sample_1.ref
===================================================================
--- trunk/tests/transformer/sample_1.ref (revision 50)
+++ trunk/tests/transformer/sample_1.ref (revision 51)
@@ -1,6 +1,3 @@
-#include <stc/any.hh>
-#include <stc/find_exact.hh>
-
void f()
{
const int16 i = 3;
Index: trunk/tests/transformer/class_predecl_inh.ref
===================================================================
--- trunk/tests/transformer/class_predecl_inh.ref (revision 50)
+++ trunk/tests/transformer/class_predecl_inh.ref (revision 51)
@@ -1,4 +1 @@
-#include <stc/any.hh>
-#include <stc/find_exact.hh>
-
class Foo: public Bar;
Index: trunk/tests/transformer/sample_3.ref
===================================================================
--- trunk/tests/transformer/sample_3.ref (revision 50)
+++ trunk/tests/transformer/sample_3.ref (revision 51)
@@ -1,6 +1,3 @@
-#include <stc/any.hh>
-#include <stc/find_exact.hh>
-
void f()
{
int i;
Index: trunk/tests/transformer/class_decl_inh_abst.ref
===================================================================
--- trunk/tests/transformer/class_decl_inh_abst.ref (revision 50)
+++ trunk/tests/transformer/class_decl_inh_abst.ref (revision 51)
@@ -1,17 +1,12 @@
-#include <stc/any.hh>
-#include <stc/find_exact.hh>
-
// Class Animal
-template < typename T >
-class Animal_: public stc::any<stc_find_exact(Animal_, T)>
+template < typename E >
+class Animal
{
};
// Class Mammal
-template < typename T >
-class Mammal_: public Animal_<stc_find_exact(Mammal_, T)>
+template < typename E >
+class Mammal: public Animal<E>
{
};
-
-typedef Mammal_<stc::itself> Mammal;
Index: trunk/tests/transformer/class_predecl.ref
===================================================================
--- trunk/tests/transformer/class_predecl.ref (revision 50)
+++ trunk/tests/transformer/class_predecl.ref (revision 51)
@@ -1,5 +1,2 @@
-#include <stc/any.hh>
-#include <stc/find_exact.hh>
-
template < typename T >
-class Foo_;
+class Foo;
--
\__/ \__/
(00) Maxime `yabo` van Noppen (00)
___) \ Epita 2009 / (___
(_____/ Président de Prologin \_____)