From a55cbe0516a14d1054e4d97a4ab6371f0819c2fb Mon Sep 17 00:00:00 2001 From: "zik.saleeba" Date: Wed, 22 Apr 2009 08:24:56 +0000 Subject: [PATCH] Added missing tests git-svn-id: http://picoc.googlecode.com/svn/trunk@261 21eae674-98b7-11dd-bd71-f92a316d2d60 --- tests/20_pointer_comparison.c | 16 ++++++++++++++++ tests/20_pointer_comparison.expect | 6 ++++++ 2 files changed, 22 insertions(+) create mode 100644 tests/20_pointer_comparison.c create mode 100644 tests/20_pointer_comparison.expect diff --git a/tests/20_pointer_comparison.c b/tests/20_pointer_comparison.c new file mode 100644 index 0000000..9561ac9 --- /dev/null +++ b/tests/20_pointer_comparison.c @@ -0,0 +1,16 @@ +int a; +int b; +int *d; +int *e; +d = &a; +e = &b; +a = 12; +b = 34; +printf("%d\n", *d); +printf("%d\n", *e); +printf("%d\n", d == e); +printf("%d\n", d != e); +d = e; +printf("%d\n", d == e); +printf("%d\n", d != e); + diff --git a/tests/20_pointer_comparison.expect b/tests/20_pointer_comparison.expect new file mode 100644 index 0000000..5d1e5f5 --- /dev/null +++ b/tests/20_pointer_comparison.expect @@ -0,0 +1,6 @@ +12 +34 +0 +1 +1 +0