• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
2* Copyright (c) 2022 Shenzhen Kaihong Digital Industry Development Co., Ltd.
3* Licensed under the Apache License, Version 2.0 (the "License");
4* you may not use this file except in compliance with the License.
5* You may obtain a copy of the License at
6*
7* http://www.apache.org/licenses/LICENSE-2.0
8*
9* Unless required by applicable law or agreed to in writing, software
10* distributed under the License is distributed on an "AS IS" BASIS,
11* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12* See the License for the specific language governing permissions and
13* limitations under the License.
14*/
15const { fun1,fun2, fun3, fun4, fun5, fun6, fun7} = require("./out/build/Release/napitest")
16var assert = require("assert");
17
18describe('interface_no_name', function () {
19    let fp2 = {
20        anchor:"abc",
21        align:"testfun2",
22        left:{
23            test1:"fun2",
24            test2: "t2"
25        }
26    }
27    let value = {
28        xOffset: 100,
29        animation: {
30            duration: 20,
31            curve: "tst"
32        }
33    }
34
35    it('test interface_no_name fun1', function () {
36        let ret = fun1({"name":"abc","age":20});
37        assert.strictEqual(ret, '');
38    });
39    it('test interface_no_name fun2', function () {
40        let ret = fun2(fp2);
41        //assert.strictEqual(ret, '');
42    });
43
44    it('test interface_no_name fun3', function () {
45        let ret = fun3("fun3p1", {nm:"abc",age:20});
46        //assert.strictEqual(ret, '');
47    });
48
49    it('test interface_no_name fun4', function () {
50        let ret = fun4("name");
51        //assert.strictEqual(ret.read, 0);
52    });
53
54    it('test interface_no_name fun5', function () {
55        fun5(value);
56        //let ret = fun5(value);
57        //assert.strictEqual(ret, void);
58    });
59    it('test interface_no_name fun6', function () {
60        fun6("name", value);
61
62    });
63    it('test interface_no_name fun7', function () {
64        fun7("name", value);
65    });
66});
67
68