source: git/Tst/New/print_nc_relations.tst @ 64daec

spielwiese
Last change on this file since 64daec was 3f5d6f, checked in by Oleksandr Motsak <motsak@…>, 13 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: 780 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
31def g = nc_algebra(-1, 1);
32
33TestRingPrinting(g, "NC G-Algebra");
34
35setring g;
36
37qring gr = twostd(ideal(var(1)^2));
38
39
40TestRingPrinting(gr, "NC GR-Algebra (quotient algebra!)");
41
42tst_status(1);$
Note: See TracBrowser for help on using the repository browser.