summaryrefslogtreecommitdiff
path: root/source3/torture
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2011-10-26 09:22:40 +1100
committerAndrew Bartlett <abartlet@samba.org>2011-10-28 13:10:27 +0200
commit961952ee643ab82738840a29cec87c925e91d8c9 (patch)
treee48b98a36f8768bce924896c05c3df4f23af5d3e /source3/torture
parent3167b95cad5b7963d6ee9e96f29c83f47362322b (diff)
downloadsamba-961952ee643ab82738840a29cec87c925e91d8c9.tar.gz
samba-961952ee643ab82738840a29cec87c925e91d8c9.tar.bz2
samba-961952ee643ab82738840a29cec87c925e91d8c9.zip
s3-torture remove unused t_asn1.c
This test was incorportated into lib/util/test/asn1_test.c with ede98c0e5190bf59461703629d5a4742ad8e044f Andrew Bartlett
Diffstat (limited to 'source3/torture')
-rw-r--r--source3/torture/t_asn1.c65
1 files changed, 0 insertions, 65 deletions
diff --git a/source3/torture/t_asn1.c b/source3/torture/t_asn1.c
deleted file mode 100644
index 0ccd97b6d5..0000000000
--- a/source3/torture/t_asn1.c
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * Copyright (C) 2004 by Volker Lendecke
- *
- * Test harness for asn1_write_*, inspired by Love Hornquist Astrand
- */
-
-#include "includes.h"
-
-static DATA_BLOB tests[] = {
- {"\x02\x01\x00", 3, NULL},
- {"\x02\x01\x7f", 3, NULL},
- {"\x02\x02\x00\x80", 4, NULL},
- {"\x02\x02\x01\x00", 4, NULL},
- {"\x02\x01\x80", 3, NULL},
- {"\x02\x02\xff\x7f", 4, NULL},
- {"\x02\x01\xff", 3, NULL},
- {"\x02\x02\xff\x01", 4, NULL},
- {"\x02\x02\x00\xff", 4, NULL},
- {"\x02\x04\x80\x00\x00\x00", 6, NULL},
- {"\x02\x04\x7f\xff\xff\xff", 6, NULL},
- {NULL, 0, NULL}
-};
-
-static int values[] = {0, 127, 128, 256, -128, -129, -1, -255, 255,
- 0x80000000, 0x7fffffff};
-
-int main(void)
-{
- int i = 0;
- int val;
- bool ok = True;
-
- for (i=0; tests[i].data != NULL; i++) {
- ASN1_DATA *data;
- DATA_BLOB blob;
-
- data = asn1_init(talloc_tos());
- if (!data) {
- return -1;
- }
-
- asn1_write_Integer(data, values[i]);
-
- if ((data->length != tests[i].length) ||
- (memcmp(data>data, tests[i].data, data->length) != 0)) {
- printf("Test for %d failed\n", values[i]);
- ok = False;
- }
-
- blob.data = data->data;
- blob.length = data->length;
- asn1_load(data, blob);
- if (!asn1_read_Integer(data, &val)) {
- printf("Could not read our own Integer for %d\n",
- values[i]);
- ok = False;
- }
- if (val != values[i]) {
- printf("%d -> ASN -> Int %d\n", values[i], val);
- ok = False;
- }
- }
-
- return ok ? 0 : 1;
-}