pw_unit_test: Standardize ASSERT_OK_AND_ASSIGN

Previously, this construct did not match the behaivor of the standard
Google ASSERT_OK_AND_ASSIGN nor PW_TRY_ASSIGN. Prior to this change,
ASSERT_OK_AND_ASSIGN would return a reference to the provided value,
rather than returning an rvalue.

After this change, ASSERT_OK_AND_MOVE is now deprecated.

Change-Id: Idbed8b0e7589d9b98f891e4f4c189bcbeb668653
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/205946
Commit-Queue: Auto-Submit <auto-submit@pigweed-service-accounts.iam.gserviceaccount.com>
Reviewed-by: Taylor Cramer <cramertj@google.com>
Reviewed-by: Carlos Chinchilla <cachinchilla@google.com>
Pigweed-Auto-Submit: Taylor Cramer <cramertj@google.com>
3 files changed
tree: 324ae0ab93785bf037450ac62d201ddd7d1adeb6
  1. .allstar/
  2. .github/
  3. .vscode/
  4. build_overrides/
  5. docker/
  6. docs/
  7. kudzu/
  8. pw_alignment/
  9. pw_allocator/
  10. pw_analog/
  11. pw_android_toolchain/
  12. pw_arduino_build/
  13. pw_assert/
  14. pw_assert_basic/
  15. pw_assert_log/
  16. pw_assert_tokenized/
  17. pw_assert_zephyr/
  18. pw_async/
  19. pw_async2/
  20. pw_async2_basic/
  21. pw_async2_epoll/
  22. pw_async_basic/
  23. pw_base64/
  24. pw_bloat/
  25. pw_blob_store/
  26. pw_bluetooth/
  27. pw_bluetooth_hci/
  28. pw_bluetooth_profiles/
  29. pw_bluetooth_proxy/
  30. pw_bluetooth_sapphire/
  31. pw_boot/
  32. pw_boot_cortex_m/
  33. pw_build/
  34. pw_build_android/
  35. pw_build_info/
  36. pw_build_mcuxpresso/
  37. pw_bytes/
  38. pw_channel/
  39. pw_checksum/
  40. pw_chre/
  41. pw_chrono/
  42. pw_chrono_embos/
  43. pw_chrono_freertos/
  44. pw_chrono_rp2040/
  45. pw_chrono_stl/
  46. pw_chrono_threadx/
  47. pw_chrono_zephyr/
  48. pw_cli/
  49. pw_compilation_testing/
  50. pw_config_loader/
  51. pw_console/
  52. pw_containers/
  53. pw_cpu_exception/
  54. pw_cpu_exception_cortex_m/
  55. pw_cpu_exception_risc_v/
  56. pw_crypto/
  57. pw_digital_io/
  58. pw_digital_io_linux/
  59. pw_digital_io_mcuxpresso/
  60. pw_digital_io_rp2040/
  61. pw_docgen/
  62. pw_doctor/
  63. pw_emu/
  64. pw_env_setup/
  65. pw_env_setup_zephyr/
  66. pw_file/
  67. pw_format/
  68. pw_function/
  69. pw_fuzzer/
  70. pw_grpc/
  71. pw_hdlc/
  72. pw_hex_dump/
  73. pw_i2c/
  74. pw_i2c_linux/
  75. pw_i2c_mcuxpresso/
  76. pw_i2c_rp2040/
  77. pw_ide/
  78. pw_interrupt/
  79. pw_interrupt_cortex_m/
  80. pw_interrupt_xtensa/
  81. pw_interrupt_zephyr/
  82. pw_intrusive_ptr/
  83. pw_json/
  84. pw_kvs/
  85. pw_libc/
  86. pw_libcxx/
  87. pw_log/
  88. pw_log_android/
  89. pw_log_basic/
  90. pw_log_null/
  91. pw_log_rpc/
  92. pw_log_string/
  93. pw_log_tokenized/
  94. pw_log_zephyr/
  95. pw_malloc/
  96. pw_malloc_freelist/
  97. pw_malloc_freertos/
  98. pw_metric/
  99. pw_minimal_cpp_stdlib/
  100. pw_module/
  101. pw_multibuf/
  102. pw_multisink/
  103. pw_package/
  104. pw_perf_test/
  105. pw_persistent_ram/
  106. pw_polyfill/
  107. pw_preprocessor/
  108. pw_presubmit/
  109. pw_protobuf/
  110. pw_protobuf_compiler/
  111. pw_random/
  112. pw_result/
  113. pw_ring_buffer/
  114. pw_router/
  115. pw_rpc/
  116. pw_rpc_transport/
  117. pw_rust/
  118. pw_sensor/
  119. pw_snapshot/
  120. pw_software_update/
  121. pw_span/
  122. pw_spi/
  123. pw_spi_linux/
  124. pw_spi_mcuxpresso/
  125. pw_spi_rp2040/
  126. pw_status/
  127. pw_stm32cube_build/
  128. pw_stream/
  129. pw_stream_shmem_mcuxpresso/
  130. pw_stream_uart_linux/
  131. pw_stream_uart_mcuxpresso/
  132. pw_string/
  133. pw_symbolizer/
  134. pw_sync/
  135. pw_sync_baremetal/
  136. pw_sync_embos/
  137. pw_sync_freertos/
  138. pw_sync_stl/
  139. pw_sync_threadx/
  140. pw_sync_zephyr/
  141. pw_sys_io/
  142. pw_sys_io_ambiq_sdk/
  143. pw_sys_io_arduino/
  144. pw_sys_io_baremetal_lm3s6965evb/
  145. pw_sys_io_baremetal_stm32f429/
  146. pw_sys_io_emcraft_sf2/
  147. pw_sys_io_mcuxpresso/
  148. pw_sys_io_rp2040/
  149. pw_sys_io_stdio/
  150. pw_sys_io_stm32cube/
  151. pw_sys_io_zephyr/
  152. pw_system/
  153. pw_target_runner/
  154. pw_thread/
  155. pw_thread_embos/
  156. pw_thread_freertos/
  157. pw_thread_stl/
  158. pw_thread_threadx/
  159. pw_thread_zephyr/
  160. pw_tls_client/
  161. pw_tls_client_boringssl/
  162. pw_tls_client_mbedtls/
  163. pw_tokenizer/
  164. pw_toolchain/
  165. pw_toolchain_bazel/
  166. pw_trace/
  167. pw_trace_tokenized/
  168. pw_transfer/
  169. pw_uart/
  170. pw_unit_test/
  171. pw_unit_test_zephyr/
  172. pw_varint/
  173. pw_watch/
  174. pw_web/
  175. pw_work_queue/
  176. seed/
  177. targets/
  178. third_party/
  179. ts/
  180. zephyr/
  181. .bazelignore
  182. .bazelrc
  183. .black.toml
  184. .clang-format
  185. .clang-tidy
  186. .eslintrc.cjs
  187. .git-blame-ignore-revs
  188. .gitattributes
  189. .gitignore
  190. .gn
  191. .mypy.ini
  192. .prettierignore
  193. .prettierrc.cjs
  194. .pw_ide.yaml
  195. .pylintrc
  196. activate.bat
  197. Android.bp
  198. AUTHORS
  199. bootstrap.bat
  200. bootstrap.sh
  201. BUILD.bazel
  202. BUILD.gn
  203. BUILDCONFIG.gn
  204. CMakeLists.txt
  205. jest.config.ts
  206. Kconfig.zephyr
  207. LICENSE
  208. modules.gni
  209. OWNERS
  210. package-lock.json
  211. package.json
  212. pigweed.json
  213. PIGWEED_MODULES
  214. README.md
  215. rollup.config.js
  216. tsconfig.json
  217. WORKSPACE
README.md

Pigweed

Pigweed is an open source collection of embedded-targeted libraries–or as we like to call them, modules. These modules are building blocks and infrastructure that enable faster and more reliable development on small-footprint MMU-less 32-bit microcontrollers like the STMicroelectronics STM32L452 or the Nordic nRF52832.

For more information please see our website: https://pigweed.dev/.

Links