[Ecm-commits] r2611 - trunk

cvs commits ecm-commits at lists.gforge.inria.fr
Fri Feb 13 21:28:33 CET 2015


Author: zimmerma
Date: 2015-02-13 21:28:32 +0100 (Fri, 13 Feb 2015)
New Revision: 2611

Modified:
   trunk/eval.c
   trunk/test.ecm
Log:
more coverage


Modified: trunk/eval.c
===================================================================
--- trunk/eval.c	2015-02-13 19:32:44 UTC (rev 2610)
+++ trunk/eval.c	2015-02-13 20:28:32 UTC (rev 2611)
@@ -83,7 +83,6 @@
   char *expr = (char *) malloc (nMaxSize + 1);
 
   ASSERT_ALWAYS (expr != NULL);
-/* Lines ending in '\\' are "joined" as a single longer line */
 JoinLinesLoop:;
   c = fgetc (fd);
   if (c == '#')
@@ -130,12 +129,6 @@
     ret = 0;
   else
     {
-      if (expr[nCurSize-1] == '\\')
-	{
-	  /* remove the '\\' char, and then process the next line */
-	  expr[--nCurSize] = 0;
-	  goto JoinLinesLoop;
-	}
       if (c == ';')
 	ungetc (c, fd);
       mpz_init (t);
@@ -165,7 +158,6 @@
   char *expr = (char *) malloc(nMaxSize+1);
 
   ASSERT_ALWAYS (expr != NULL);
-/* Lines ending in '\\' are "joined" as a single longer line */
   c = cp;
 JoinLinesLoop:;
   if (*c == '#')
@@ -197,12 +189,6 @@
     ret = 0;
   else
     {
-      if (expr[nCurSize-1] == '\\')
-	{
-	  /* remove the '\\' char, and then process the next line */
-	  expr[--nCurSize] = 0;
-	  goto JoinLinesLoop;
-	}
       if (*c != ';')
 	++c;
       mpz_init(t);
@@ -243,7 +229,7 @@
     mpz_pow_ui(n,prior_n,mpz_get_ui(n));
   else if ('!'==op)	/* simple factorial  (syntax n!    example: 7! == 1*2*3*4*5*6*7) */
     mpz_fac_ui(n,mpz_get_ui(n));
-  else if ('@'==op)	/* Multi factorial   (syntax n!prior_n.  example: 15!3 == 15*12*9*6*3) */
+  else if ('@'==op)	/* Multi factorial   (syntax n at prior_n.  example: 15 at 3 == 15*12*9*6*3) */
     {
       long nCur;
       unsigned long nDecr;

Modified: trunk/test.ecm
===================================================================
--- trunk/test.ecm	2015-02-13 19:32:44 UTC (rev 2610)
+++ trunk/test.ecm	2015-02-13 20:28:32 UTC (rev 2611)
@@ -120,6 +120,12 @@
 
 echo "2^919-1" | $ECM -param 0 -sigma 262763035 937 1; checkcode $? 6
 
+echo "2^919-1 // comment" | $ECM -param 0 -sigma 262763035 937 1; checkcode $? 6
+
+echo "101#-1" | $ECM -sigma 0:17 4e5; checkcode $? 14
+
+echo '101!-1' | $ECM -sigma 0:17 1e5; checkcode $? 2
+
 # idem with -nobase2
 echo "2^919-1" | $ECM -nobase2 -param 0 -sigma 262763035 937 1; checkcode $? 6
 



More information about the Ecm-commits mailing list