r23792: convert Samba4 to GPLv3
[garming/samba-autobuild/.git] / source4 / torture / ui.h
index 329462ba28a315846156479d40420c1aeeab82c3..fe35c8362c49b87b7a82adbdcb1dcb11c8adfec1 100644 (file)
@@ -6,7 +6,7 @@
    
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2 of the License, or
+   the Free Software Foundation; either version 3 of the License, or
    (at your option) any later version.
    
    This program is distributed in the hope that it will be useful,
@@ -15,8 +15,7 @@
    GNU General Public License for more details.
    
    You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software
-   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
 #ifndef __TORTURE_UI_H__
@@ -90,6 +89,7 @@ struct torture_context
 
        char *outputdir;
        int level;
+       struct event_context *ev;
 };
 
 /* 
@@ -245,6 +245,16 @@ void torture_result(struct torture_context *test,
        } \
        } while(0)
 
+#define torture_assert_u64_equal(torture_ctx,got,expected,cmt)\
+       do { uint64_t __got = (got), __expected = (expected); \
+       if (__got != __expected) { \
+               torture_result(torture_ctx, TORTURE_FAIL, \
+                       __location__": "#got" was %llu, expected %llu: %s", \
+                       (unsigned long long)__got, (unsigned long long)__expected, cmt); \
+               return false; \
+       } \
+       } while(0)
+
 #define torture_assert_errno_equal(torture_ctx,expected,cmt)\
        do { int __expected = (expected); \
        if (errno != __expected) { \