BRSetLocalName.test.js 17.3 KB
Newer Older
Q
quanli 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93
/*
 * Copyright (C) 2022 Huawei Device Co., Ltd.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

import bluetooth from '@ohos.bluetooth';
import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from '@ohos/hypium'
let Btname = {
    NUM_TEST :'012345678901234567890123456789012345678901234567890123'+
    '45678901234567890123456789012345678901234567890123456789012345678901234567',
    NUM_TEST1 :'0123456789012345678901234567890123456789012345678901'
    +'23456789012345678901234567890123456789012345678901234567890123456789012345678012'
    +'345678901234567890123456789012345678901234567890123456789012367890123456789012345568'
    +'01234567890123456789012345678912',
    LETTERS_TEST :'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa',
    CHINESES_TEST :'测试蓝牙名称是否正常测试蓝牙名称是否试蓝牙',
    SYMBOL_TEST:'*^_^* 、。·ˉˇ¨〃々—~‖·‘’“”「『』〖❂【±×'
    +'÷∶∧∨∑∏∪∩∈∷√⊥‖∠⌒⊙∫∮≡≌≈∽∝≠♂♀°℃$¤¢£‰§№☆★○●◎◇□■△※→←↑↓〓',
    MIXES:'测试蓝牙名称是否正试蓝牙\'名称是否[666]aaw',
    MIXES2:'——◎◇◆□■△▲测试蓝牙',
    MIXES3:'78453-、、。。◎◇◆□■△▲',
    MIXES4:'hhhfdf-、、。。◎◇◆□■△▲',
    MIXES5:'#01-5@<?;:!@$%^&*(1[]{【+-;:‘’“”测试=》《\'[6]',
    MIXES6:'#01-567890@<>?/;:5675ASDF012345678!@'
    +'$%^&*()9012378901[]{}【】566~·67890blue',
    MIXES7:'0123456789012345678901234567890123456789012345678901'
    +'23456789012345678901234567890123456789012345678901234567890123456789012345678012'
    +'345678901234567890123456789012345678901234567890123456789012367890123456789012345568'
    +'012345678901234567890123456789123'
}
export default function bluetoothhostTest1() {
describe('bluetoothhostTest1', function() {
    function sleep(delay) {
        return new Promise(resovle => setTimeout(resovle, delay))
    }
    async function tryToEnableBt() {
        let sta = bluetooth.getState();
        switch(sta){
            case 0:
                bluetooth.enableBluetooth();
                await sleep(5000);
                let sta1 = bluetooth.getState();
                console.info('[bluetooth_js] bt turn off:'+ JSON.stringify(sta1));
                break;
            case 1:
                console.info('[bluetooth_js] bt turning on:'+ JSON.stringify(sta));
                await sleep(3000);
                break;
            case 2:
                console.info('[bluetooth_js] bt turn on:'+ JSON.stringify(sta));
                break;
            case 3:
                bluetooth.enableBluetooth();
                await sleep(3000);
                let sta2 = bluetooth.getState();
                console.info('[bluetooth_js] bt turning off:'+ JSON.stringify(sta2));
                break;
            default:
                console.info('[bluetooth_js] enable success');
        }
    }
    beforeAll(function () {
        console.info('beforeAll called')
    })
    beforeEach(async function(done) {
        console.info('beforeEach called')
        await tryToEnableBt()
        done()
    })
    afterEach(function () {
        console.info('afterEach called')
    })
    afterAll(function () {
        console.info('afterAll called')
    })

    /**
     * @tc.number SUB_COMMUNICATION_BLUETOOTH_BR_LocalName_0100
     * @tc.name setLocalName
     * @tc.desc Test setLocalName api by promise.
     * @tc.size MEDIUM
     * @ since 8
     * @tc.type Function
Q
quanli 已提交
94
     * @tc.level Level 1 
Q
quanli 已提交
95 96
     */
    it('SUB_COMMUNICATION_BLUETOOTH_BR_LocalName_0100', 0, async function (done) {
Q
quanli 已提交
97
        let result = bluetooth.setLocalName(Btname.LETTERS_TEST);
Q
quanli 已提交
98
        expect(result).assertTrue();
Q
quanli 已提交
99
        await sleep(1000);
Q
quanli 已提交
100 101
        let getNewName = bluetooth.getLocalName();
        console.info('[bluetooth_js] LocalName_0100 NewName = '+ JSON.stringify(getNewName));
Q
quanli 已提交
102
        expect(true).assertEqual(Btname.LETTERS_TEST == getNewName);
Q
quanli 已提交
103 104 105 106 107 108 109 110 111 112
        done();
    })

    /**
     * @tc.number SUB_COMMUNICATION_BLUETOOTH_BR_LocalName_0200
     * @tc.name setLocalName
     * @tc.desc Test setLocalName api by promise.
     * @tc.size MEDIUM
     * @ since 8
     * @tc.type Function
Q
quanli 已提交
113
     * @tc.level Level 3
Q
quanli 已提交
114 115
     */
    it('SUB_COMMUNICATION_BLUETOOTH_BR_LocalName_0200', 0, async function (done) {
Q
quanli 已提交
116
        let result = bluetooth.setLocalName(Btname.CHINESES_TEST);
Q
quanli 已提交
117
        expect(result).assertTrue();
Q
quanli 已提交
118
        await sleep(1000);
Q
quanli 已提交
119 120
        let getNewName = bluetooth.getLocalName();
        console.info('[bluetooth_js] LocalName_0200 NewName = '+ JSON.stringify(getNewName));
Q
quanli 已提交
121
        expect(true).assertEqual(Btname.CHINESES_TEST == getNewName);
Q
quanli 已提交
122 123 124 125 126 127 128 129 130 131
        done();
    })

    /**
     * @tc.number SUB_COMMUNICATION_BLUETOOTH_BR_LocalName_0300
     * @tc.name setLocalName
     * @tc.desc Test setLocalName api by promise.
     * @tc.size MEDIUM
     * @ since 8
     * @tc.type Function
Q
quanli 已提交
132
     * @tc.level Level 2
Q
quanli 已提交
133 134
     */
    it('SUB_COMMUNICATION_BLUETOOTH_BR_LocalName_0300', 0, async function (done) {
Q
quanli 已提交
135
        let result = bluetooth.setLocalName(Btname.NUM_TEST);
Q
quanli 已提交
136
        expect(result).assertTrue();
Q
quanli 已提交
137
        await sleep(1000);
Q
quanli 已提交
138 139
        let getNewName = bluetooth.getLocalName();
        console.info('[bluetooth_js] LocalName_0300 NewName = '+ JSON.stringify(getNewName));
Q
quanli 已提交
140
        expect(true).assertEqual(Btname.NUM_TEST == getNewName);
Q
quanli 已提交
141 142 143
        done();
    })

Q
quanli 已提交
144
   /**
Q
quanli 已提交
145 146 147 148 149 150
     * @tc.number SUB_COMMUNICATION_BLUETOOTH_BR_LocalName_0400
     * @tc.name setLocalName
     * @tc.desc Test setLocalName api by promise.
     * @tc.size MEDIUM
     * @ since 8
     * @tc.type Function
Q
quanli 已提交
151
     * @tc.level Level 1
Q
quanli 已提交
152 153
     */
    it('SUB_COMMUNICATION_BLUETOOTH_BR_LocalName_0400', 0, async function (done) {
Q
quanli 已提交
154
        let result = bluetooth.setLocalName(Btname.SYMBOL_TEST);
Q
quanli 已提交
155
        expect(result).assertTrue();
Q
quanli 已提交
156
        await sleep(1000);
Q
quanli 已提交
157 158
        let getNewName = bluetooth.getLocalName();
        console.info('[bluetooth_js] LocalName_0400 NewName = '+ JSON.stringify(getNewName));
Q
quanli 已提交
159
        expect(true).assertEqual(Btname.SYMBOL_TEST == getNewName);
Q
quanli 已提交
160 161 162
        done();
    })

Q
quanli 已提交
163
    /**
Q
quanli 已提交
164 165 166 167 168 169
     * @tc.number SUB_COMMUNICATION_BLUETOOTH_BR_LocalName_0500
     * @tc.name setLocalName
     * @tc.desc Test setLocalName api by promise.
     * @tc.size MEDIUM
     * @ since 8
     * @tc.type Function
Q
quanli 已提交
170
     * @tc.level Level 2
Q
quanli 已提交
171 172
     */
    it('SUB_COMMUNICATION_BLUETOOTH_BR_LocalName_0500', 0, async function (done) {
Q
quanli 已提交
173 174
        let newName = 'my bluetooth';
        let result = bluetooth.setLocalName(newName);
Q
quanli 已提交
175
        expect(result).assertTrue();
Q
quanli 已提交
176
        await sleep(1000);
Q
quanli 已提交
177 178
        let getNewName = bluetooth.getLocalName();
        console.info('[bluetooth_js] LocalName_0500 NewName = '+ JSON.stringify(getNewName));
Q
quanli 已提交
179
        expect(true).assertEqual(newName == getNewName);
Q
quanli 已提交
180 181 182 183 184 185 186 187 188 189
        done();
    })

    /**
     * @tc.number SUB_COMMUNICATION_BLUETOOTH_BR_LocalName_0600
     * @tc.name setLocalName
     * @tc.desc Test setLocalName api by promise.
     * @tc.size MEDIUM
     * @ since 8
     * @tc.type Function
Q
quanli 已提交
190
     * @tc.level Level 3
Q
quanli 已提交
191 192
     */
    it('SUB_COMMUNICATION_BLUETOOTH_BR_LocalName_0600', 0, async function (done) {
Q
quanli 已提交
193
        let newName = 'bluetooth1234ABCDEFGH';
Q
quanli 已提交
194 195
        let result = bluetooth.setLocalName(newName);
        expect(result).assertTrue();
Q
quanli 已提交
196
        await sleep(1000);
Q
quanli 已提交
197 198 199 200 201 202 203 204
        let getNewName = bluetooth.getLocalName();
        console.info('[bluetooth_js] LocalName_0600 NewName = '+ JSON.stringify(getNewName));
        expect(true).assertEqual(newName == getNewName);
        done();
    })

    /**
     * @tc.number SUB_COMMUNICATION_BLUETOOTH_BR_LocalName_0700
Q
quanli 已提交
205 206
     * @tc.name TEST setLocalName
     * @tc.desc TEST setLocalName api by promise.
Q
quanli 已提交
207 208 209 210 211 212
     * @tc.size MEDIUM
     * @ since 8
     * @tc.type Function
     * @tc.level Level 3
     */
    it('SUB_COMMUNICATION_BLUETOOTH_BR_LocalName_0700', 0, async function (done) {
Q
quanli 已提交
213
        let newName = '蓝牙设备bluetooth';
Q
quanli 已提交
214 215
        let result = bluetooth.setLocalName(newName);
        expect(result).assertTrue();
Q
quanli 已提交
216
        await sleep(1000);
Q
quanli 已提交
217 218 219 220 221 222 223 224 225 226 227 228 229 230 231
        let getNewName = bluetooth.getLocalName();
        console.info('[bluetooth_js] LocalName_0700 NewName = '+ JSON.stringify(getNewName));
        expect(true).assertEqual(newName == getNewName);
        done();
    })

    /**
     * @tc.number SUB_COMMUNICATION_BLUETOOTH_BR_LocalName_0800
     * @tc.name TEST setLocalName
     * @tc.desc TEST setLocalName api by promise.
     * @tc.size MEDIUM
     * @ since 8
     * @tc.type Function
     * @tc.level Level 3
     */
Q
quanli 已提交
232 233
     it('SUB_COMMUNICATION_BLUETOOTH_BR_LocalName_0800', 0, async function (done) {
        let result = bluetooth.setLocalName(Btname.MIXES4);
Q
quanli 已提交
234
        expect(result).assertTrue();
Q
quanli 已提交
235
        await sleep(1000);
Q
quanli 已提交
236 237
        let getNewName = bluetooth.getLocalName();
        console.info('[bluetooth_js] LocalName_0800 NewName = '+ JSON.stringify(getNewName));
Q
quanli 已提交
238
        expect(true).assertEqual(Btname.MIXES4 == getNewName);
Q
quanli 已提交
239 240 241 242 243 244 245 246 247 248 249 250
        done();
    })

    /**
     * @tc.number SUB_COMMUNICATION_BLUETOOTH_BR_LocalName_0900
     * @tc.name TEST setLocalName
     * @tc.desc TEST setLocalName api by promise.
     * @tc.size MEDIUM
     * @ since 8
     * @tc.type Function
     * @tc.level Level 3
     */
Q
quanli 已提交
251 252
    it('SUB_COMMUNICATION_BLUETOOTH_BR_LocalName_0900', 0, async function (done) {
        let result = bluetooth.setLocalName(Btname.MIXES2);
Q
quanli 已提交
253
        expect(result).assertTrue();
Q
quanli 已提交
254
        await sleep(1000);
Q
quanli 已提交
255 256
        let getNewName = bluetooth.getLocalName();
        console.info('[bluetooth_js] LocalName_0900 NewName = '+ JSON.stringify(getNewName));
Q
quanli 已提交
257
        expect(true).assertEqual(Btname.MIXES2 == getNewName);
Q
quanli 已提交
258 259 260 261 262 263 264 265 266 267 268 269 270
        done();
    })

    /**
     * @tc.number SUB_COMMUNICATION_BLUETOOTH_BR_LocalName_1000
     * @tc.name TEST setLocalName
     * @tc.desc TEST setLocalName api by promise.
     * @tc.size MEDIUM
     * @ since 8
     * @tc.type Function
     * @tc.level Level 3
     */
    it('SUB_COMMUNICATION_BLUETOOTH_BR_LocalName_1000', 0, async function (done) {
Q
quanli 已提交
271
        let result = bluetooth.setLocalName(Btname.MIXES3);
Q
quanli 已提交
272
        expect(result).assertTrue();
Q
quanli 已提交
273
        await sleep(1000);
Q
quanli 已提交
274 275
        let getNewName = bluetooth.getLocalName();
        console.info('[bluetooth_js] LocalName_1000 NewName = '+ JSON.stringify(getNewName));
Q
quanli 已提交
276
        expect(true).assertEqual(Btname.MIXES3 == getNewName);
Q
quanli 已提交
277 278 279 280 281 282 283 284 285 286
        done();
    })

    /**
     * @tc.number SUB_COMMUNICATION_BLUETOOTH_BR_LocalName_1100
     * @tc.name TEST setLocalName
     * @tc.desc TEST setLocalName api by promise.
     * @tc.size MEDIUM
     * @ since 8
     * @tc.type Function
Q
quanli 已提交
287
     * @tc.level Level 2
Q
quanli 已提交
288 289
     */
    it('SUB_COMMUNICATION_BLUETOOTH_BR_LocalName_1100', 0, async function (done) {
Q
quanli 已提交
290 291
        let newName = '蓝牙设备123';
        let result = bluetooth.setLocalName(newName);
Q
quanli 已提交
292
        expect(result).assertTrue();
Q
quanli 已提交
293
        await sleep(1000);
Q
quanli 已提交
294 295
        let getNewName = bluetooth.getLocalName();
        console.info('[bluetooth_js] LocalName_1100 NewName = '+ JSON.stringify(getNewName));
Q
quanli 已提交
296
        expect(true).assertEqual(newName == getNewName);
Q
quanli 已提交
297 298 299 300 301 302 303 304 305 306
        done();
    })

    /**
     * @tc.number SUB_COMMUNICATION_BLUETOOTH_BR_LocalName_1200
     * @tc.name TEST setLocalName
     * @tc.desc TEST setLocalName api by promise.
     * @tc.size MEDIUM
     * @ since 8
     * @tc.type Function
Q
quanli 已提交
307
     * @tc.level Level 3
Q
quanli 已提交
308 309
     */
    it('SUB_COMMUNICATION_BLUETOOTH_BR_LocalName_1200', 0, async function (done) {
Q
quanli 已提交
310
        let newName = '蓝牙设备bluetooth12';
Q
quanli 已提交
311 312
        let result = bluetooth.setLocalName(newName);
        expect(result).assertTrue();
Q
quanli 已提交
313
        await sleep(1000);
Q
quanli 已提交
314
        let getNewName = bluetooth.getLocalName();
Q
quanli 已提交
315
        console.info('[bluetooth_js] LocalName1200 NewName = '+ JSON.stringify(getNewName));
Q
quanli 已提交
316 317 318 319 320 321 322 323 324 325 326 327 328
        expect(true).assertEqual(newName == getNewName);
        done();
    })

    /**
     * @tc.number SUB_COMMUNICATION_BLUETOOTH_BR_LocalName_1300
     * @tc.name TEST setLocalName
     * @tc.desc TEST setLocalName api by promise.
     * @tc.size MEDIUM
     * @ since 8
     * @tc.type Function
     * @tc.level Level 3
     */
Q
quanli 已提交
329 330
      it('SUB_COMMUNICATION_BLUETOOTH_BR_LocalName_1300', 0, async function (done) {
        let result = bluetooth.setLocalName(Btname.MIXES6);
Q
quanli 已提交
331
        expect(result).assertTrue();
Q
quanli 已提交
332
        await sleep(1000);
Q
quanli 已提交
333 334
        let getNewName = bluetooth.getLocalName();
        console.info('[bluetooth_js] LocalName_1300 NewName = '+ JSON.stringify(getNewName));
Q
quanli 已提交
335
        expect(true).assertEqual(Btname.MIXES6 == getNewName);
Q
quanli 已提交
336 337 338 339 340 341 342 343 344 345 346 347
        done();
    })

    /**
     * @tc.number SUB_COMMUNICATION_BLUETOOTH_BR_LocalName_1400
     * @tc.name TEST setLocalName
     * @tc.desc TEST setLocalName api by promise.
     * @tc.size MEDIUM
     * @ since 8
     * @tc.type Function
     * @tc.level Level 3
     */
Q
quanli 已提交
348 349
    it('SUB_COMMUNICATION_BLUETOOTH_BR_LocalName_1400', 0, async function (done) {
        let result = bluetooth.setLocalName(Btname.MIXES);
Q
quanli 已提交
350
        expect(result).assertTrue();
Q
quanli 已提交
351
        await sleep(1000);
Q
quanli 已提交
352 353
        let getNewName = bluetooth.getLocalName();
        console.info('[bluetooth_js] LocalName_1400 NewName = '+ JSON.stringify(getNewName));
Q
quanli 已提交
354 355
        expect(true).assertEqual(Btname.MIXES == getNewName);
        
Q
quanli 已提交
356 357 358 359 360 361 362 363 364 365 366 367 368
        done();
    })

    /**
     * @tc.number SUB_COMMUNICATION_BLUETOOTH_BR_LocalName_1500
     * @tc.name TEST setLocalName
     * @tc.desc TEST setLocalName api by promise.
     * @tc.size MEDIUM
     * @ since 8
     * @tc.type Function
     * @tc.level Level 3
     */
    it('SUB_COMMUNICATION_BLUETOOTH_BR_LocalName_1500', 0, async function (done) {
Q
quanli 已提交
369
        let result = bluetooth.setLocalName(Btname.MIXES5);
Q
quanli 已提交
370
        expect(result).assertTrue();
Q
quanli 已提交
371
        await sleep(1000);
Q
quanli 已提交
372 373
        let getNewName = bluetooth.getLocalName();
        console.info('[bluetooth_js] LocalName_1500 NewName = '+ JSON.stringify(getNewName));
Q
quanli 已提交
374
        expect(true).assertEqual(Btname.MIXES5 == getNewName);
Q
quanli 已提交
375 376 377 378 379 380 381 382 383 384 385 386 387
        done();
    })

    /**
     * @tc.number SUB_COMMUNICATION_BLUETOOTH_BR_LocalName_1600
     * @tc.name TEST setLocalName
     * @tc.desc TEST setLocalName api by promise.
     * @tc.size MEDIUM
     * @ since 8
     * @tc.type Function
     * @tc.level Level 3
     */
    it('SUB_COMMUNICATION_BLUETOOTH_BR_LocalName_1600', 0, async function (done) {
Q
quanli 已提交
388
        let result = bluetooth.setLocalName(Btname.NUM_TEST1);
Q
quanli 已提交
389
        expect(result).assertTrue();
Q
quanli 已提交
390
        await sleep(1000);
Q
quanli 已提交
391 392
        let getNewName = bluetooth.getLocalName();
        console.info('[bluetooth_js] LocalName_1600 NewName = '+ JSON.stringify(getNewName));
Q
quanli 已提交
393
        expect(true).assertEqual(Btname.NUM_TEST1 == getNewName);
Q
quanli 已提交
394 395 396 397 398 399 400 401 402 403 404 405 406
        done();
    })

    /**
     * @tc.number SUB_COMMUNICATION_BLUETOOTH_BR_LocalName_1700
     * @tc.name TEST setLocalName
     * @tc.desc TEST setLocalName api by promise.
     * @tc.size MEDIUM
     * @ since 8
     * @tc.type Function
     * @tc.level Level 3
     */
    it('SUB_COMMUNICATION_BLUETOOTH_BR_LocalName_1700', 0, async function (done) {
Q
quanli 已提交
407
        let result = bluetooth.setLocalName(Btname.MIXES7);
Q
quanli 已提交
408
        expect(result).assertTrue();
Q
quanli 已提交
409
        await sleep(1000);
Q
quanli 已提交
410 411
        let getNewName = bluetooth.getLocalName();
        console.info('[bluetooth_js] LocalName_1700 NewName = '+ JSON.stringify(getNewName));
Q
quanli 已提交
412
        expect(false).assertEqual(Btname.MIXES7 == getNewName);
Q
quanli 已提交
413 414 415 416 417 418 419 420 421 422 423 424 425
        done();
    })

    /**
     * @tc.number SUB_COMMUNICATION_BLUETOOTH_BR_LocalName_1800
     * @tc.name TEST setLocalName
     * @tc.desc TEST setLocalName api by promise.
     * @tc.size MEDIUM
     * @ since 8
     * @tc.type Function
     * @tc.level Level 3
     */
    it('SUB_COMMUNICATION_BLUETOOTH_BR_LocalName_1800', 0, async function (done) {
Q
quanli 已提交
426 427 428
        let name = bluetooth.getLocalName();
        let set = bluetooth.setLocalName('');
        expect(set).assertFalse();
Q
quanli 已提交
429
        await sleep(1000);
Q
quanli 已提交
430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450
        let localName = bluetooth.getLocalName();
        expect(true).assertTrue(localName==name);
        console.info('[bluetooth_js] getLocalName1800=' + JSON.stringify(localName));
        done();
    })

    /**
     * @tc.number SUB_COMMUNICATION_BLUETOOTH_BR_LocalName_1900
     * @tc.name set LocalName
     * @tc.desc Test setLocalName api by promise.
     * @tc.size MEDIUM
     * @ since 8
     * @tc.type Function
     * @tc.level Level 3
     */
    it('SUB_COMMUNICATION_BLUETOOTH_BR_LocalName_1900', 0, async function (done) {
        let localName = bluetooth.getLocalName();
        console.info('[bluetooth_js] LocalName_1900 localName = '+ JSON.stringify(localName));
        expect(true).assertEqual(localName!=null);
        let newName = 'bluetoothtest';
        let result = bluetooth.setLocalName(newName);
Q
quanli 已提交
451
        expect(result).assertTrue();
Q
quanli 已提交
452
        await sleep(1000);
Q
quanli 已提交
453
        let getNewName = bluetooth.getLocalName();
Q
quanli 已提交
454 455 456 457
        console.info('[bluetooth_js] LocalName_1900 NewName = '+ JSON.stringify(getNewName));
        expect(true).assertEqual(newName == getNewName);
        let result1=bluetooth.setLocalName(localName);
        expect(result1).assertTrue();
Q
quanli 已提交
458
        await sleep(1000);
Q
quanli 已提交
459 460 461
        let getLocalName = bluetooth.getLocalName();
        console.info('[bluetooth_js] LocalNam1900 localName ='+ JSON.stringify(getLocalName));
        expect(true).assertEqual(localName == getLocalName);
Q
quanli 已提交
462 463 464 465 466 467
        done();
    })

})
}

Q
quanli 已提交
468

Q
quanli 已提交
469