diff options
Diffstat (limited to 'gcc/testsuite/g++.old-deja/g++.law/operators8.C')
-rw-r--r-- | gcc/testsuite/g++.old-deja/g++.law/operators8.C | 50 |
1 files changed, 1 insertions, 49 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.law/operators8.C b/gcc/testsuite/g++.old-deja/g++.law/operators8.C index 0b59d3cd1b5..b3b753c1a91 100644 --- a/gcc/testsuite/g++.old-deja/g++.law/operators8.C +++ b/gcc/testsuite/g++.old-deja/g++.law/operators8.C @@ -1,49 +1 @@ -// GROUPS passed operators -#include <stdio.h> - -class shape { - public: - virtual void vDisplay(void) const = 0; - protected: - int X; - int Y; -}; - -class square :public shape { - public: - square(int x, int y, int width_) { - X = x; - Y = y; - width = width_; - } - void vDisplay(void) const { - printf ("PASS\n"); - } - protected: - int width; -}; - - -class triangle :public shape { - public: - triangle(int x, int y, int width_, int height_) { - X = x; - Y = y; - width = width_; - height = height_; - } - void vDisplay(void) const { - printf ("FAIL\n"); - } - protected: - int width; - int height; -}; - -main() { - shape* s1 = new square(4,4,5); - shape* s2 = new triangle(6,6,2,3); - *s1 = *s2; - s1->vDisplay(); -} - +int main() { |