From ec7dc6a619d7fca83a49065c45fdbc0fa93249a0 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 21 Dec 2009 23:19:08 +1100 Subject: s4-torture: update uuid_compare test for new behaviour --- source4/torture/ndr/ndr.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'source4/torture/ndr/ndr.c') diff --git a/source4/torture/ndr/ndr.c b/source4/torture/ndr/ndr.c index 8602003017..471c398b77 100644 --- a/source4/torture/ndr/ndr.c +++ b/source4/torture/ndr/ndr.c @@ -233,12 +233,21 @@ static bool test_compare_uuid(struct torture_context *tctx) "GUID diff invalid"); g1.time_low = 10; - torture_assert_int_equal(tctx, 10, GUID_compare(&g1, &g2), + torture_assert_int_equal(tctx, 1, GUID_compare(&g1, &g2), "GUID diff invalid"); g1.time_low = 0; g1.clock_seq[1] = 20; - torture_assert_int_equal(tctx, 20, GUID_compare(&g1, &g2), + torture_assert_int_equal(tctx, 1, GUID_compare(&g1, &g2), + "GUID diff invalid"); + + g1.time_low = ~0; + torture_assert_int_equal(tctx, 1, GUID_compare(&g1, &g2), + "GUID diff invalid"); + + g1.time_low = 0; + g2.time_low = ~0; + torture_assert_int_equal(tctx, -1, GUID_compare(&g1, &g2), "GUID diff invalid"); return true; } -- cgit