--- a/tests/tegros.cc
+++ b/tests/tegros.cc
@@ -45,7 +45,7 @@
   cout << "Q("<<S5<<", 6) has "<<Q_S5_6.size() << " elements (should be "<<2*pow(6,S5.size())<<")\n";
   cout<<endl;
 
-  bigrational j(bigint(272223782641), bigint(164025));
+  bigrational j(to_ZZ("272223782641"), bigint(164025));
   cout<<"Curves with good reduction outside "<<S5<<" and j = "<<j;
   if (is_j_possible(j,S5))
     cout <<" do exist"<<endl;
@@ -66,7 +66,7 @@
   cout << "Elliptic curves with conductor a power of 11, from their known j-invariants" << endl;
   vector<bigrational> j11 = {
     bigrational(bigint(-122023936), bigint(161051)),
-    bigrational(bigint(-52893159101157376), bigint(11)),
+    bigrational(to_ZZ("-52893159101157376"), bigint(11)),
     bigrational(bigint(-4096), bigint(11)),
     bigrational(bigint(-121)),
     bigrational(bigint(-32768)),
