// File: /workspace/github_c_makefile_star2_O2/OpenKMIP[P]libkmip/tests/tests.c
// Function: test_deep_copy_text_string
int
test_deep_copy_text_string(TestTracker *tracker)
{
    TRACK_TEST(tracker);

    TextString expected = {0};
    expected.value = "example";
    expected.size = 7;
    TextString *observed = NULL;

    observed = kmip_deep_copy_text_string(NULL, NULL);
    if(observed != NULL)
        TEST_FAILED(tracker, __func__, __LINE__);

    KMIP ctx = {0};
    kmip_init(&ctx, NULL, 0, KMIP_1_0);

    observed = kmip_deep_copy_text_string(&ctx, NULL);
    if(observed != NULL)
    {
        kmip_destroy(&ctx);
        TEST_FAILED(tracker, __func__, __LINE__);
    }

    observed = kmip_deep_copy_text_string(&ctx, &expected);
    if(observed == NULL)
    {
        kmip_destroy(&ctx);
        TEST_FAILED(tracker, __func__, __LINE__);
    }
    if(!kmip_compare_text_string(&expected, observed))
    {
        kmip_print_text_string(stderr, 1, "Name Value", &expected);
        kmip_print_text_string(stderr, 1, "Name Value", observed);
        kmip_free_text_string(&ctx, observed);
        ctx.free_func(ctx.state, observed);
        kmip_destroy(&ctx);
        TEST_FAILED(tracker, __func__, __LINE__);
    }

    kmip_free_text_string(&ctx, observed);
    ctx.free_func(ctx.state, observed);
    kmip_destroy(&ctx);

    TEST_PASSED(tracker, __func__);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x8b0, %rsp            # imm = 0x8B0
movq %rdi, %rbx
incw (%rdi)
leaq 0x22f64(%rip), %rax     # 0x2657c
movq %rax, 0x8(%rsp)
movq $0x7, 0x10(%rsp)
xorl %edi, %edi
xorl %esi, %esi
callq 0x14553
testq %rax, %rax
je 0x3657
leaq 0x22be7(%rip), %rdi     # 0x26222
leaq 0x22f42(%rip), %rsi     # 0x26584
movl $0x579, %edx            # imm = 0x579
xorl %eax, %eax
callq 0x1090
incw 0x2(%rbx)
pushq $0x1
popq %rbp
jmp 0x36b6
leaq 0x18(%rsp), %r14
movl $0x898, %edx            # imm = 0x898
movq %r14, %rdi
xorl %esi, %esi
callq 0x10c0
movq %r14, %rdi
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x128ed
movq %r14, %rdi
xorl %esi, %esi
callq 0x14553
leaq 0x18(%rsp), %rdi
testq %rax, %rax
je 0x36c8
callq 0x12ade
leaq 0x22b89(%rip), %rdi     # 0x26222
leaq 0x22ee4(%rip), %rsi     # 0x26584
movl $0x582, %edx            # imm = 0x582
xorl %eax, %eax
callq 0x1090
pushq $0x1
popq %rbp
pushq $0x2
popq %rax
incw (%rbx,%rax)
movl %ebp, %eax
addq $0x8b0, %rsp            # imm = 0x8B0
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x8(%rsp), %rsi
callq 0x14553
testq %rax, %rax
je 0x372f
movq %rax, %r14
leaq 0x8(%rsp), %rdi
movq %rax, %rsi
callq 0x14bdc
testl %eax, %eax
je 0x3751
leaq 0x18(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x12f63
movq 0x890(%r15), %rdi
movq %r14, %rsi
callq *0x878(%r15)
movq %r15, %rdi
callq 0x12ade
leaq 0x22afc(%rip), %rdi     # 0x26217
leaq 0x22e62(%rip), %rsi     # 0x26584
xorl %ebp, %ebp
xorl %eax, %eax
callq 0x1090
pushq $0x4
jmp 0x36b1
leaq 0x18(%rsp), %rdi
callq 0x12ade
leaq 0x22ae2(%rip), %rdi     # 0x26222
leaq 0x22e3d(%rip), %rsi     # 0x26584
movl $0x589, %edx            # imm = 0x589
jmp 0x36a5
movq 0x3a8a0(%rip), %r12     # 0x3dff8
movq (%r12), %rdi
leaq 0x22e3c(%rip), %r15     # 0x2659f
pushq $0x1
popq %rbp
leaq 0x8(%rsp), %rcx
movl %ebp, %esi
movq %r15, %rdx
callq 0x234f9
movq (%r12), %rdi
movl %ebp, %esi
movq %r15, %rdx
movq %r14, %rcx
callq 0x234f9
leaq 0x18(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x12f63
movq 0x890(%r15), %rdi
movq %r14, %rsi
callq *0x878(%r15)
movq %r15, %rdi
callq 0x12ade
leaq 0x22a6c(%rip), %rdi     # 0x26222
leaq 0x22dc7(%rip), %rsi     # 0x26584
movl $0x592, %edx            # imm = 0x592
xorl %eax, %eax
callq 0x1090
jmp 0x36af