From 5b622e690e6dd441498b57e4cafe034937f43629 Mon Sep 17 00:00:00 2001 From: Jonathan Hui Date: Fri, 28 Feb 2020 21:45:04 -0800 Subject: [PATCH] [typos] fix typos (#4613) --- include/openthread/diag.h | 2 +- include/openthread/link.h | 2 +- include/openthread/netdata.h | 2 +- include/openthread/platform/diag.h | 2 +- src/core/common/locator.hpp | 2 +- src/core/diags/factory_diags.hpp | 2 +- src/core/mac/data_poll_handler.hpp | 2 +- src/core/meshcop/dataset_manager.hpp | 2 +- src/core/thread/lowpan.hpp | 4 ++-- src/core/thread/time_sync_service.cpp | 4 ++-- src/lib/spinel/spinel.c | 2 +- src/lib/spinel/spinel.h | 10 +++++----- src/ncp/ncp_spi.cpp | 2 +- src/posix/platform/radio_spinel.cpp | 2 +- tests/scripts/thread-cert/Cert_5_2_04_REEDUpgrade.py | 4 ++-- .../thread-cert/Cert_9_2_02_MGMTCommissionerSet.py | 2 +- tests/toranj/test-004-scan.py | 2 +- tests/toranj/test-016-neighbor-table.py | 2 +- tests/toranj/test-024-partition-merge.py | 6 +++--- ...st-032-child-attach-with-multiple-ip-addresses.py | 6 +++--- .../toranj/test-034-poor-link-parent-child-attach.py | 2 +- tests/toranj/test-600-channel-manager-properties.py | 12 ++++++------ .../test-602-channel-manager-channel-select.py | 8 ++++---- tests/unit/test_hdlc.cpp | 8 ++++---- tests/unit/test_spinel_buffer.cpp | 4 ++-- tests/unit/test_spinel_decoder.cpp | 2 +- 26 files changed, 49 insertions(+), 49 deletions(-) diff --git a/include/openthread/diag.h b/include/openthread/diag.h index 2ace7abc2..49d180ab9 100644 --- a/include/openthread/diag.h +++ b/include/openthread/diag.h @@ -60,7 +60,7 @@ extern "C" { * @param[out] aOutput The diagnostics execution result. * @param[in] aOutputMaxLen The output buffer size. * - * @retval OT_ERROR_INVALID_ARGS The command is supported but invalid arugments provided. + * @retval OT_ERROR_INVALID_ARGS The command is supported but invalid arguments provided. * @retval OT_ERROR_NONE The command is successfully process. * @retval OT_ERROR_NOT_IMPLEMENTED The command is not supported. * diff --git a/include/openthread/link.h b/include/openthread/link.h index 98fff206d..bb2b0cbf0 100644 --- a/include/openthread/link.h +++ b/include/openthread/link.h @@ -113,7 +113,7 @@ typedef struct otMacCounters * Note that this counter is incremented for each MAC transmission request only by one, * regardless of the amount of CCA failures, CSMA-CA attempts, or retransmissions. * - * This incrementation rule applies to the following counters: + * This increment rule applies to the following counters: * @p mTxUnicast * @p mTxBroadcast * @p mTxAckRequested diff --git a/include/openthread/netdata.h b/include/openthread/netdata.h index d1eb81df6..d608c027b 100644 --- a/include/openthread/netdata.h +++ b/include/openthread/netdata.h @@ -187,7 +187,7 @@ typedef struct otServiceConfig } otServiceConfig; /** - * This method provides a full or stable copy of the Parition's Thread Network Data. + * This method provides a full or stable copy of the Partition's Thread Network Data. * * @param[in] aInstance A pointer to an OpenThread instance. * @param[in] aStable TRUE when copying the stable version, FALSE when copying the full version. diff --git a/include/openthread/platform/diag.h b/include/openthread/platform/diag.h index bc3d03492..2cd413ca6 100644 --- a/include/openthread/platform/diag.h +++ b/include/openthread/platform/diag.h @@ -65,7 +65,7 @@ extern "C" { * @param[out] aOutput The diagnostics execution result. * @param[in] aOutputMaxLen The output buffer size. * - * @retval OT_ERROR_INVALID_ARGS The command is supported but invalid arugments provided. + * @retval OT_ERROR_INVALID_ARGS The command is supported but invalid arguments provided. * @retval OT_ERROR_NONE The command is successfully process. * @retval OT_ERROR_NOT_IMPLEMENTED The command is not supported. * diff --git a/src/core/common/locator.hpp b/src/core/common/locator.hpp index 13f80f369..8655cac89 100644 --- a/src/core/common/locator.hpp +++ b/src/core/common/locator.hpp @@ -125,7 +125,7 @@ private: /** * This class implements a locator for an OpenThread Instance object. * - * The `InstanceLocatorInit` is similar to `InstanceLoator` but provides a default constructor (instead of a + * The `InstanceLocatorInit` is similar to `InstanceLocator` but provides a default constructor (instead of a * parameterized one) and allows an inheriting class to initialize the object (set the OpenThread Instance) post * constructor call using the `Init()` method. This class is intended for types that require a default constructor and * cannot use a parameterized one. (e.g., `Neighbor`/`Child`/`Router` classes which are used as a C array element type diff --git a/src/core/diags/factory_diags.hpp b/src/core/diags/factory_diags.hpp index 3289d6930..f6a137469 100644 --- a/src/core/diags/factory_diags.hpp +++ b/src/core/diags/factory_diags.hpp @@ -76,7 +76,7 @@ public: * @param[out] aOutput The diagnostics execution result. * @param[in] aOutputMaxLen The output buffer size. * - * @retval OT_ERROR_INVALID_ARGS The command is supported but invalid arugments provided. + * @retval OT_ERROR_INVALID_ARGS The command is supported but invalid arguments provided. * @retval OT_ERROR_NONE The command is successfully process. * @retval OT_ERROR_NOT_IMPLEMENTED The command is not supported. * diff --git a/src/core/mac/data_poll_handler.hpp b/src/core/mac/data_poll_handler.hpp index c6657e7ae..4fcbd34f0 100644 --- a/src/core/mac/data_poll_handler.hpp +++ b/src/core/mac/data_poll_handler.hpp @@ -157,7 +157,7 @@ public: * This callback method requests a frame to be prepared for indirect transmission to a given sleepy child. * * @param[out] aFrame A reference to a MAC frame where the new frame would be placed. - * @prarm[out] aContext A reference to a `FrameContext` where the context for the new frame would be placed. + * @param[out] aContext A reference to a `FrameContext` where the context for the new frame would be placed. * @param[in] aChild The child for which to prepare the frame. * * @retval OT_ERROR_NONE Frame was prepared successfully diff --git a/src/core/meshcop/dataset_manager.hpp b/src/core/meshcop/dataset_manager.hpp index cc0967a96..dbb29d67c 100644 --- a/src/core/meshcop/dataset_manager.hpp +++ b/src/core/meshcop/dataset_manager.hpp @@ -242,7 +242,7 @@ protected: void HandleTimer(void); /** - * This method re-defines template `Get()` as the `InstanceLoctaor` (base class) definition is shadowed by + * This method re-defines template `Get()` as the `InstanceLocator` (base class) definition is shadowed by * the public `Get(dataset)` methods in this class. * */ diff --git a/src/core/thread/lowpan.hpp b/src/core/thread/lowpan.hpp index 8dd0a7e8e..e90ba4d9c 100644 --- a/src/core/thread/lowpan.hpp +++ b/src/core/thread/lowpan.hpp @@ -560,7 +560,7 @@ public: * A first fragment header starts at offset zero. * * @param[in] aSize The Datagram Size value. - * @param[in] aTage The Datagram Tag value. + * @param[in] aTag The Datagram Tag value. * */ void InitFirstFragment(uint16_t aSize, uint16_t aTag) { Init(aSize, aTag, 0); } @@ -571,7 +571,7 @@ public: * The @p aOffset value will be truncated to become a multiple of 8. * * @param[in] aSize The Datagram Size value. - * @param[in] aTage The Datagram Tag value. + * @param[in] aTag The Datagram Tag value. * @param[in] aOffset The Datagram Offset value. * */ diff --git a/src/core/thread/time_sync_service.cpp b/src/core/thread/time_sync_service.cpp index 18b88b684..6e968afc0 100644 --- a/src/core/thread/time_sync_service.cpp +++ b/src/core/thread/time_sync_service.cpp @@ -88,7 +88,7 @@ void TimeSync::HandleTimeSyncMessage(const Message &aMessage) if (mTimeSyncSeq != OT_TIME_SYNC_INVALID_SEQ && timeSyncSeqDelta < 0) { // An older time sync sequence was received. This indicates that there is a device that still needs to be - // synchronised with the current sequence, so forward it. + // synchronized with the current sequence, so forward it. mTimeSyncRequired = true; otLogInfoCore("Older time sync seq received:%u. Forwarding current seq:%u", aMessage.GetTimeSyncSeq(), @@ -97,7 +97,7 @@ void TimeSync::HandleTimeSyncMessage(const Message &aMessage) else if (Get().GetRole() == OT_DEVICE_ROLE_LEADER && timeSyncSeqDelta > 0) { // Another device is forwarding a later time sync sequence, perhaps because it merged from a different - // partition. The leader is authoritative, so ensure all devices synchronise to the time being seeded by this + // partition. The leader is authoritative, so ensure all devices synchronize to the time being seeded by this // leader instead. mTimeSyncSeq = aMessage.GetTimeSyncSeq() + 1; mTimeSyncRequired = true; diff --git a/src/lib/spinel/spinel.c b/src/lib/spinel/spinel.c index 2769bda3e..335d71529 100644 --- a/src/lib/spinel/spinel.c +++ b/src/lib/spinel/spinel.c @@ -2252,7 +2252,7 @@ const char *spinel_prop_key_to_cstr(spinel_prop_key_t prop_key) const char *spinel_net_role_to_cstr(uint8_t net_role) { - const char *ret = "NET_ROLE_UNKNONW"; + const char *ret = "NET_ROLE_UNKNOWN"; switch (net_role) { diff --git a/src/lib/spinel/spinel.h b/src/lib/spinel/spinel.h index c96d792bf..359a7e9b2 100644 --- a/src/lib/spinel/spinel.h +++ b/src/lib/spinel/spinel.h @@ -383,9 +383,9 @@ enum SPINEL_STATUS_INVALID_STATE = 4, ///< This operation is invalid for the current device state. SPINEL_STATUS_INVALID_COMMAND = 5, ///< This command is not recognized. SPINEL_STATUS_INVALID_INTERFACE = 6, ///< This interface is not supported. - SPINEL_STATUS_INTERNAL_ERROR = 7, ///< An internal runtime error has occured. - SPINEL_STATUS_SECURITY_ERROR = 8, ///< A security/authentication error has occured. - SPINEL_STATUS_PARSE_ERROR = 9, ///< A error has occured while parsing the command. + SPINEL_STATUS_INTERNAL_ERROR = 7, ///< An internal runtime error has occurred. + SPINEL_STATUS_SECURITY_ERROR = 8, ///< A security/authentication error has occurred. + SPINEL_STATUS_PARSE_ERROR = 9, ///< A error has occurred while parsing the command. SPINEL_STATUS_IN_PROGRESS = 10, ///< This operation is in progress. SPINEL_STATUS_NOMEM = 11, ///< Operation prevented due to memory pressure. SPINEL_STATUS_BUSY = 12, ///< The device is currently performing a mutually exclusive operation @@ -3058,7 +3058,7 @@ enum * * Required capability: SPINEL_CAP_THREAD_COMMISSIONER * - * The valid values are specified by SPINEL_MESHCOP_COMMISIONER_STATE_ enumeration. + * The valid values are specified by SPINEL_MESHCOP_COMMISSIONER_STATE_ enumeration. * */ SPINEL_PROP_MESHCOP_COMMISSIONER_STATE = SPINEL_PROP_MESHCOP__BEGIN + 2, @@ -3936,7 +3936,7 @@ enum /// The NCP timestamp base /** Format: X (write-only) * - * This property controls the time base value that is used for logs timestamp field calulation. + * This property controls the time base value that is used for logs timestamp field calculation. * */ SPINEL_PROP_DEBUG_LOG_TIMESTAMP_BASE = SPINEL_PROP_DEBUG__BEGIN + 3, diff --git a/src/ncp/ncp_spi.cpp b/src/ncp/ncp_spi.cpp index de572faed..b1248b7ac 100644 --- a/src/ncp/ncp_spi.cpp +++ b/src/ncp/ncp_spi.cpp @@ -110,7 +110,7 @@ NcpSpi::NcpSpi(Instance *aInstance) // reset flag was set. otPlatSpiSlavePrepareTransaction(mEmptySendFrameZeroAccept, kSpiHeaderSize, mEmptyReceiveFrame, kSpiHeaderSize, - /* aRequestTras */ true); + /* aRequestTransactionFlag */ true); } bool NcpSpi::SpiTransactionComplete(void * aContext, diff --git a/src/posix/platform/radio_spinel.cpp b/src/posix/platform/radio_spinel.cpp index 9273603be..3677a18c8 100644 --- a/src/posix/platform/radio_spinel.cpp +++ b/src/posix/platform/radio_spinel.cpp @@ -1258,7 +1258,7 @@ otError RadioSpinel::WaitResponse(void) } while (mWaitingTid || !mIsReady); LogIfFail("Error waiting response", mError); - // This indicates end of waiting repsonse. + // This indicates end of waiting response. mWaitingKey = SPINEL_PROP_LAST_STATUS; return mError; } diff --git a/tests/scripts/thread-cert/Cert_5_2_04_REEDUpgrade.py b/tests/scripts/thread-cert/Cert_5_2_04_REEDUpgrade.py index 58971cf9a..64ca87db1 100755 --- a/tests/scripts/thread-cert/Cert_5_2_04_REEDUpgrade.py +++ b/tests/scripts/thread-cert/Cert_5_2_04_REEDUpgrade.py @@ -39,7 +39,7 @@ ROUTER = 16 DUT_REED = 17 ED = 18 MESH_LOCAL_PREFIX = 'fdde:ad00:beef:0:' -ROUTING_LACATOR = ':0:ff:fe00' +ROUTING_LOCATOR = ':0:ff:fe00' REED_ADVERTISEMENT_INTERVAL = 570 REED_ADVERTISEMENT_MAX_JITTER = 60 ROUTER_SELECTION_JITTER = 1 @@ -167,7 +167,7 @@ class Cert_5_2_4_REEDUpgrade(unittest.TestCase): mleid = None for addr in self.nodes[LEADER].get_addrs(): if (addr.find(MESH_LOCAL_PREFIX) != -1 and - addr.find(ROUTING_LACATOR) == -1): + addr.find(ROUTING_LOCATOR) == -1): mleid = addr break diff --git a/tests/scripts/thread-cert/Cert_9_2_02_MGMTCommissionerSet.py b/tests/scripts/thread-cert/Cert_9_2_02_MGMTCommissionerSet.py index 1e5392936..e4f3b66e5 100755 --- a/tests/scripts/thread-cert/Cert_9_2_02_MGMTCommissionerSet.py +++ b/tests/scripts/thread-cert/Cert_9_2_02_MGMTCommissionerSet.py @@ -85,7 +85,7 @@ class Cert_9_2_02_MGMTCommissionerSet(unittest.TestCase): self.simulator.go(3) self.simulator.get_messages_sent_by(COMMISSIONER) # Skip LEAD_PET.req - # Get CommissionerSesssionId from LEAD_PET.rsp + # Get CommissionerSessionId from LEAD_PET.rsp leader_messages = self.simulator.get_messages_sent_by(LEADER) msg = leader_messages.next_coap_message('2.04', assert_enabled=True) commissioner_session_id_tlv = command.get_sub_tlv( diff --git a/tests/toranj/test-004-scan.py b/tests/toranj/test-004-scan.py index ff4603ef4..a28c8e9b7 100644 --- a/tests/toranj/test-004-scan.py +++ b/tests/toranj/test-004-scan.py @@ -30,7 +30,7 @@ from wpan import verify import wpan # ----------------------------------------------------------------------------------------------------------------------- -# Test desciption: Active scan and permit-join +# Test description: Active scan and permit-join test_name = __file__[:-3] if __file__.endswith('.py') else __file__ print('-' * 120) diff --git a/tests/toranj/test-016-neighbor-table.py b/tests/toranj/test-016-neighbor-table.py index 83609661d..9086f9f59 100644 --- a/tests/toranj/test-016-neighbor-table.py +++ b/tests/toranj/test-016-neighbor-table.py @@ -85,7 +85,7 @@ for num in range(NUM_CHILDREN): children[num].whitelist_node(routers[0]) routers[0].whitelist_node(children[num]) -# whiltelist the end-device ed with its corresponding router +# whitelist the end-device ed with its corresponding router for num in range(1, NUM_ROUTERS): ed[num].whitelist_node(routers[num]) routers[num].whitelist_node(ed[num]) diff --git a/tests/toranj/test-024-partition-merge.py b/tests/toranj/test-024-partition-merge.py index 5a16822af..ab2724b7b 100644 --- a/tests/toranj/test-024-partition-merge.py +++ b/tests/toranj/test-024-partition-merge.py @@ -146,7 +146,7 @@ verify(r2.get(wpan.WPAN_NODE_TYPE) == wpan.NODE_TYPE_ROUTER) r1.un_whitelist_node(r2) r2.un_whitelist_node(r1) -# Add a prefix before r2 releaizes it can not longer talk +# Add a prefix before r2 realizes it can not longer talk # to leader (r1). r2.add_prefix(prefix2) @@ -167,11 +167,11 @@ r1.whitelist_node(r2) r2.whitelist_node(r1) -def check_paritition_id_macth(): +def check_partition_id_match(): verify(r1.get(wpan.WPAN_PARTITION_ID) == r2.get(wpan.WPAN_PARTITION_ID)) -wpan.verify_within(check_paritition_id_macth, long_wait) +wpan.verify_within(check_partition_id_match, long_wait) # Check that partitions merged successfully diff --git a/tests/toranj/test-032-child-attach-with-multiple-ip-addresses.py b/tests/toranj/test-032-child-attach-with-multiple-ip-addresses.py index 4dda76897..c0e9ba6cf 100644 --- a/tests/toranj/test-032-child-attach-with-multiple-ip-addresses.py +++ b/tests/toranj/test-032-child-attach-with-multiple-ip-addresses.py @@ -162,7 +162,7 @@ wpan.verify_within(check_child_is_associated, WAIT_TIME) # child table. -def check_child_addressses_on_parent(): +def check_child_addresses_on_parent(): child_addrs = parent.get(wpan.WPAN_THREAD_CHILD_TABLE_ADDRESSES) verify(child_addrs.find(prefix1) > 0) verify(child_addrs.find(prefix2) > 0) @@ -170,7 +170,7 @@ def check_child_addressses_on_parent(): verify(child_addrs.find(prefix4) > 0) -wpan.verify_within(check_child_addressses_on_parent, WAIT_TIME) +wpan.verify_within(check_child_addresses_on_parent, WAIT_TIME) # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # Check the child recovery after a parent reset using quick re-attach @@ -194,7 +194,7 @@ child.set(wpan.WPAN_POLL_INTERVAL, '100') # Verify that we again see all the child addresses in the parent's child table. # Note that child should register its addresses using "Child Update # Request" exchange. -wpan.verify_within(check_child_addressses_on_parent, WAIT_TIME) +wpan.verify_within(check_child_addresses_on_parent, WAIT_TIME) # Verify that there was no state change on child. verify(child_num_state_changes == len(wpan.parse_list(child.get("stat:ncp")))) diff --git a/tests/toranj/test-034-poor-link-parent-child-attach.py b/tests/toranj/test-034-poor-link-parent-child-attach.py index 2bcf93c2f..784598cea 100644 --- a/tests/toranj/test-034-poor-link-parent-child-attach.py +++ b/tests/toranj/test-034-poor-link-parent-child-attach.py @@ -31,7 +31,7 @@ import wpan # ----------------------------------------------------------------------------------------------------------------------- # Test description: # -# This test covers a situation where a single parent exists in network with poor link quality ensuding the child +# This test covers a situation where a single parent exists in network with poor link quality ensuring the child # can attach the parent. test_name = __file__[:-3] if __file__.endswith('.py') else __file__ diff --git a/tests/toranj/test-600-channel-manager-properties.py b/tests/toranj/test-600-channel-manager-properties.py index d4bf7e7e6..01d5485be 100644 --- a/tests/toranj/test-600-channel-manager-properties.py +++ b/tests/toranj/test-600-channel-manager-properties.py @@ -77,15 +77,15 @@ verify(node.get(wpan.WPAN_CHANNEL_MANAGER_AUTO_SELECT_ENABLED) == 'false') node.set(wpan.WPAN_CHANNEL_MANAGER_AUTO_SELECT_INTERVAL, '1000') verify(int(node.get(wpan.WPAN_CHANNEL_MANAGER_AUTO_SELECT_INTERVAL), 0) == 1000) -all_channls_mask = int('0x7fff800', 0) +all_channels_mask = int('0x7fff800', 0) chan_11_mask = int('0x800', 0) chan_11_to_13_mask = int('0x3800', 0) node.set(wpan.WPAN_CHANNEL_MANAGER_SUPPORTED_CHANNEL_MASK, - str(all_channls_mask)) + str(all_channels_mask)) verify( int(node.get(wpan.WPAN_CHANNEL_MANAGER_SUPPORTED_CHANNEL_MASK), 0) == - all_channls_mask) + all_channels_mask) node.set(wpan.WPAN_CHANNEL_MANAGER_FAVORED_CHANNEL_MASK, str(chan_11_mask)) verify( @@ -98,10 +98,10 @@ verify( int(node.get(wpan.WPAN_CHANNEL_MANAGER_SUPPORTED_CHANNEL_MASK), 0) == chan_11_to_13_mask) -node.set(wpan.WPAN_CHANNEL_MANAGER_FAVORED_CHANNEL_MASK, str(all_channls_mask)) +node.set(wpan.WPAN_CHANNEL_MANAGER_FAVORED_CHANNEL_MASK, str(all_channels_mask)) verify( int(node.get(wpan.WPAN_CHANNEL_MANAGER_FAVORED_CHANNEL_MASK), 0) == - all_channls_mask) + all_channels_mask) node.set(wpan.WPAN_CHANNEL_MANAGER_AUTO_SELECT_ENABLED, '1') verify(node.get(wpan.WPAN_CHANNEL_MANAGER_AUTO_SELECT_ENABLED) == 'true') @@ -123,7 +123,7 @@ while node.get(wpan.WPAN_STATE) != wpan.STATE_ASSOCIATED: verify(node.get(wpan.WPAN_CHANNEL_MANAGER_AUTO_SELECT_ENABLED) == 'true') verify( int(node.get(wpan.WPAN_CHANNEL_MANAGER_FAVORED_CHANNEL_MASK), 0) == - all_channls_mask) + all_channels_mask) verify( int(node.get(wpan.WPAN_CHANNEL_MANAGER_SUPPORTED_CHANNEL_MASK), 0) == chan_11_to_13_mask) diff --git a/tests/toranj/test-602-channel-manager-channel-select.py b/tests/toranj/test-602-channel-manager-channel-select.py index 96230cc4b..fe771f3c7 100644 --- a/tests/toranj/test-602-channel-manager-channel-select.py +++ b/tests/toranj/test-602-channel-manager-channel-select.py @@ -77,16 +77,16 @@ node.form('channel-manager', channel=24) # ----------------------------------------------------------------------------------------------------------------------- # Test implementation -all_channls_mask = int('0x7fff800', 0) +all_channels_mask = int('0x7fff800', 0) chan_12_to_15_mask = int('0x000f000', 0) chan_15_to_17_mask = int('0x0038000', 0) # Set supported channel mask to be all channels node.set(wpan.WPAN_CHANNEL_MANAGER_SUPPORTED_CHANNEL_MASK, - str(all_channls_mask)) + str(all_channels_mask)) verify( int(node.get(wpan.WPAN_CHANNEL_MANAGER_SUPPORTED_CHANNEL_MASK), 0) == - all_channls_mask) + all_channels_mask) # Sleep for 4.5 second with speedup factor of 10,000 this is more than 12 # hours. @@ -157,7 +157,7 @@ node.set(wpan.WPAN_CHANNEL_MANAGER_NEW_CHANNEL, '12') # request a channel change to 12 verify(int(node.get(wpan.WPAN_CHANNEL_MANAGER_NEW_CHANNEL), 0) == 12) verify_channel([node], 12) -node.set(wpan.WPAN_CHANNEL_MANAGER_FAVORED_CHANNEL_MASK, str(all_channls_mask)) +node.set(wpan.WPAN_CHANNEL_MANAGER_FAVORED_CHANNEL_MASK, str(all_channels_mask)) node.set(wpan.WPAN_CHANNEL_MANAGER_CHANNEL_SELECT, 'true') verify(int(node.get(wpan.WPAN_CHANNEL_MANAGER_NEW_CHANNEL), 0) == 12) verify_channel([node], 12) diff --git a/tests/unit/test_hdlc.cpp b/tests/unit/test_hdlc.cpp index 8721052b4..577216f85 100644 --- a/tests/unit/test_hdlc.cpp +++ b/tests/unit/test_hdlc.cpp @@ -55,7 +55,7 @@ static const uint8_t sOpenThreadText[] = "OpenThread Rocks"; static const uint8_t sHelloText[] = "Hello there!"; static const uint8_t sMottoText[] = "Think good thoughts, say good words, do good deeds!"; static const uint8_t sHexText[] = "0123456789abcdef"; -static const uint8_t sHdlcSpeicals[] = {kFlagSequence, kFlagXOn, kFlagXOff, +static const uint8_t sHdlcSpecials[] = {kFlagSequence, kFlagXOn, kFlagXOff, kFlagSequence, kEscapeSequence, kFlagSpecial}; otError WriteToBuffer(const uint8_t *aText, Hdlc::FrameWritePointer &aWritePointer) @@ -395,7 +395,7 @@ void TestEncoderDecoder(void) encoderBuffer.SaveFrame(); SuccessOrQuit(encoder.BeginFrame(), "Encoder::BeginFrame() failed"); - SuccessOrQuit(encoder.Encode(sHdlcSpeicals, sizeof(sHdlcSpeicals)), "Encoder::Encode() failed"); + SuccessOrQuit(encoder.Encode(sHdlcSpecials, sizeof(sHdlcSpecials)), "Encoder::Encode() failed"); SuccessOrQuit(encoder.EndFrame(), "Encoder::EndFrame() failed"); encoderBuffer.SaveFrame(); @@ -439,8 +439,8 @@ void TestEncoderDecoder(void) VerifyOrQuit(memcmp(frame, sMottoText, length) == 0, "Decoded frame content does not match original frame"); SuccessOrQuit(decoderBuffer.GetNextSavedFrame(frame, length), "Incorrect decoded frame"); - VerifyOrQuit(length == sizeof(sHdlcSpeicals), "Decoded frame length does not match original frame"); - VerifyOrQuit(memcmp(frame, sHdlcSpeicals, length) == 0, "Decoded frame content does not match original frame"); + VerifyOrQuit(length == sizeof(sHdlcSpecials), "Decoded frame length does not match original frame"); + VerifyOrQuit(memcmp(frame, sHdlcSpecials, length) == 0, "Decoded frame content does not match original frame"); SuccessOrQuit(decoderBuffer.GetNextSavedFrame(frame, length), "Incorrect decoded frame"); VerifyOrQuit(length == sizeof(sHelloText) - 1, "Decoded frame length does not match original frame"); diff --git a/tests/unit/test_spinel_buffer.cpp b/tests/unit/test_spinel_buffer.cpp index 626a0e4b7..780fd3b0b 100644 --- a/tests/unit/test_spinel_buffer.cpp +++ b/tests/unit/test_spinel_buffer.cpp @@ -880,7 +880,7 @@ enum kLensArraySize = 500, // Size of "Lengths" array. kMaxFrameLen = 400, // Maximum frame length kReadProbability = 50, // Probability (in percent) to randomly choose to read vs write frame - kHighPriorityProbablity = 20, // Probability (in percent) to write a high priority frame + kHighPriorityProbability = 20, // Probability (in percent) to write a high priority frame kUseTrueRandomNumberGenerator = 1, // To use true random number generator or not. }; @@ -1020,7 +1020,7 @@ void TestFuzzBuffer(void) uint32_t len = GetRandom(kMaxFrameLen) + 1; Spinel::Buffer::Priority priority; - if (GetRandom(100) < kHighPriorityProbablity) + if (GetRandom(100) < kHighPriorityProbability) { priority = Spinel::Buffer::kPriorityHigh; } diff --git a/tests/unit/test_spinel_decoder.cpp b/tests/unit/test_spinel_decoder.cpp index 36a8f0cb1..b69afe516 100644 --- a/tests/unit/test_spinel_decoder.cpp +++ b/tests/unit/test_spinel_decoder.cpp @@ -594,7 +594,7 @@ void TestDecoder(void) SuccessOrQuit(decoder.CloseStruct(), "CloseStruct() failed."); SuccessOrQuit(decoder.ReadUint16(u16), "ReadUint16() failed."); - // `ResetToSaved()` should fail sicne the enclosing struct for the saved position is closed. + // `ResetToSaved()` should fail since the enclosing struct for the saved position is closed. VerifyOrQuit(decoder.ResetToSaved() == OT_ERROR_INVALID_STATE, "ResetToSaved() did not fail."); }