pidl: Move Generate*Env functions to Parse::Pidl::Samba4::Header because they only...
[ira/wip.git] / source / pidl / tests / ndr_align.pl
index 26336b777202518567e174cc6be9e367e35551b3..cc089eaa1f7aabf1f48266dd31e6613b68d352f4 100755 (executable)
@@ -16,7 +16,7 @@ test_samba4_ndr('align-uint8-uint16',
        } bla;
 ',
 '
-       struct ndr_push *ndr = ndr_push_init_ctx(NULL);
+       struct ndr_push *ndr = ndr_push_init_ctx(NULL, NULL);
        struct bla r;
        uint8_t expected[] = { 0x0D, 0x00, 0xef, 0xbe };
        DATA_BLOB expected_blob = { expected, 4 };
@@ -24,7 +24,7 @@ test_samba4_ndr('align-uint8-uint16',
        r.x = 13;
        r.y = 0xbeef;
 
-       if (NT_STATUS_IS_ERR(ndr_push_bla(ndr, NDR_SCALARS|NDR_BUFFERS, &r)))
+       if (!NDR_ERR_CODE_IS_SUCCESS(ndr_push_bla(ndr, NDR_SCALARS|NDR_BUFFERS, &r)))
                return 1;
 
        result_blob = ndr_push_blob(ndr);
@@ -41,7 +41,7 @@ test_samba4_ndr('align-uint8-uint32',
        } bla;
 ',
 '
-       struct ndr_push *ndr = ndr_push_init_ctx(NULL);
+       struct ndr_push *ndr = ndr_push_init_ctx(NULL, NULL);
        struct bla r;
        uint8_t expected[] = { 0x0D, 0x00, 0x00, 0x00, 0xef, 0xbe, 0xef, 0xbe };
        DATA_BLOB expected_blob = { expected, 8 };
@@ -49,7 +49,7 @@ test_samba4_ndr('align-uint8-uint32',
        r.x = 13;
        r.y = 0xbeefbeef;
 
-       if (NT_STATUS_IS_ERR(ndr_push_bla(ndr, NDR_SCALARS|NDR_BUFFERS, &r)))
+       if (!NDR_ERR_CODE_IS_SUCCESS(ndr_push_bla(ndr, NDR_SCALARS|NDR_BUFFERS, &r)))
                return 1;
 
        result_blob = ndr_push_blob(ndr);
@@ -67,7 +67,7 @@ test_samba4_ndr('align-uint8-hyper',
        } bla;
 ',
 '
-       struct ndr_push *ndr = ndr_push_init_ctx(NULL);
+       struct ndr_push *ndr = ndr_push_init_ctx(NULL, NULL);
        struct bla r;
        uint8_t expected[] = { 0x0D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
                               0xef, 0xbe, 0xef, 0xbe, 0xef, 0xbe, 0xef, 0xbe };
@@ -76,7 +76,7 @@ test_samba4_ndr('align-uint8-hyper',
        r.x = 13;
        r.y = 0xbeefbeefbeefbeefLLU;
 
-       if (NT_STATUS_IS_ERR(ndr_push_bla(ndr, NDR_SCALARS|NDR_BUFFERS, &r)))
+       if (!NDR_ERR_CODE_IS_SUCCESS(ndr_push_bla(ndr, NDR_SCALARS|NDR_BUFFERS, &r)))
                return 1;
 
        result_blob = ndr_push_blob(ndr);
@@ -93,7 +93,7 @@ test_samba4_ndr('noalignflag-uint8-uint16',
        } bla;
 ',
 '
-       struct ndr_push *ndr = ndr_push_init_ctx(NULL);
+       struct ndr_push *ndr = ndr_push_init_ctx(NULL, NULL);
        struct bla r;
        uint8_t expected[] = { 0x0D, 0xef, 0xbe };
        DATA_BLOB expected_blob = { expected, 3 };
@@ -103,7 +103,7 @@ test_samba4_ndr('noalignflag-uint8-uint16',
        r.x = 13;
        r.y = 0xbeef;
 
-       if (NT_STATUS_IS_ERR(ndr_push_bla(ndr, NDR_SCALARS|NDR_BUFFERS, &r)))
+       if (!NDR_ERR_CODE_IS_SUCCESS(ndr_push_bla(ndr, NDR_SCALARS|NDR_BUFFERS, &r)))
                return 1;
 
        result_blob = ndr_push_blob(ndr);
@@ -121,7 +121,7 @@ test_samba4_ndr('align-blob-align2',
        } blie;
 ',
 '
-       struct ndr_push *ndr = ndr_push_init_ctx(NULL);
+       struct ndr_push *ndr = ndr_push_init_ctx(NULL, NULL);
        struct blie r;
        uint8_t data[] = { 0x01, 0x02 };
        uint8_t expected[] = { 0x0D, 0x00, 0x0E };
@@ -133,7 +133,7 @@ test_samba4_ndr('align-blob-align2',
        r.data.data = data;
        r.data.length = 2;
 
-       if (NT_STATUS_IS_ERR(ndr_push_blie(ndr, NDR_SCALARS|NDR_BUFFERS, &r)))
+       if (!NDR_ERR_CODE_IS_SUCCESS(ndr_push_blie(ndr, NDR_SCALARS|NDR_BUFFERS, &r)))
                return 1;
 
        result_blob = ndr_push_blob(ndr);