bcb4e51a409d94ae670de96afb8483a4f7855294Stephan Bosch/* Copyright (c) 2017-2018 Dovecot authors, see the included COPYING file */
4c7d704408fc77467143a945dc2d0a856f72e674Timo Sirainen buf = buffer_create_dynamic(default_pool, 128);
4c7d704408fc77467143a945dc2d0a856f72e674Timo Sirainen area = memarea_init(buf->data, buf->used, test_callback, buf);
4c7d704408fc77467143a945dc2d0a856f72e674Timo Sirainen test_assert(memarea_get(area, &size) == buf->data && size == buf->used);
4c7d704408fc77467143a945dc2d0a856f72e674Timo Sirainen test_assert(memarea_get_refcount(area2) == 2);