source: git/Tst/New/print_qring.tst @ d208a80

spielwiese
Last change on this file since d208a80 was 3f5d6f, checked in by Oleksandr Motsak <motsak@…>, 12 years ago
FIX: printing vs. typing of a quotient ring ADD: tests for printing vs typing for qrings & non-commutative algebras
  • Property mode set to 100644
File size: 671 bytes
Line 
1LIB "tst.lib"; tst_init();
2
3proc TestRingPrinting(def r, string n)
4{
5  def save = basering;
6 
7  setring r;
8 
9  "VVVVVVVVVVVV[", n, "]VVVVVVVVVVVV";
10 
11  "r == currRing (the following type and print should yield the same output!): ";
12  "type: "; r;
13  "print(ring): "; print(r); 
14
15  ring @temp = 2,@a,ds; setring @temp;
16 
17  "r != currRing (the following type and print may be different!): "; 
18  "type: "; r;
19  "print(ring): "; print(r);
20 
21  "^^^^^^^^^^^^[", n, "]^^^^^^^^^^^^";
22  kill @temp;
23 
24  setring save;
25}
26
27ring r;
28
29TestRingPrinting(r, "default commutative polynomial ring");
30
31qring q = std(ideal(x2));
32
33TestRingPrinting(q, "quotient ring");
34
35tst_status(1);$
Note: See TracBrowser for help on using the repository browser.