1*448a3816Sskrll /*	$NetBSD: find_property.c,v 1.1.1.3 2019/12/22 12:34:05 skrll Exp $	*/
229e6f9daSskrll 
3*448a3816Sskrll // SPDX-License-Identifier: LGPL-2.1-or-later
4ad6eb39cSmacallan /*
5ad6eb39cSmacallan  * libfdt - Flat Device Tree manipulation
6ad6eb39cSmacallan  *	Testcase for fdt_property_offset()
7ad6eb39cSmacallan  * Copyright (C) 2006 David Gibson, IBM Corporation.
8ad6eb39cSmacallan  */
9ad6eb39cSmacallan #include <stdlib.h>
10ad6eb39cSmacallan #include <stdio.h>
11ad6eb39cSmacallan #include <string.h>
12ad6eb39cSmacallan #include <stdint.h>
13ad6eb39cSmacallan 
14ad6eb39cSmacallan #include <libfdt.h>
15ad6eb39cSmacallan 
16ad6eb39cSmacallan #include "tests.h"
17ad6eb39cSmacallan #include "testdata.h"
18ad6eb39cSmacallan 
main(int argc,char * argv[])19ad6eb39cSmacallan int main(int argc, char *argv[])
20ad6eb39cSmacallan {
21ad6eb39cSmacallan 	void *fdt;
22ad6eb39cSmacallan 
23ad6eb39cSmacallan 	test_init(argc, argv);
24ad6eb39cSmacallan 	fdt = load_blob_arg(argc, argv);
25ad6eb39cSmacallan 
26ad6eb39cSmacallan 	check_property_cell(fdt, 0, "prop-int", TEST_VALUE_1);
27ad6eb39cSmacallan 	check_property(fdt, 0, "prop-str", strlen(TEST_STRING_1)+1, TEST_STRING_1);
28ad6eb39cSmacallan 
29ad6eb39cSmacallan 	PASS();
30ad6eb39cSmacallan }
31