Commit Graph

9 Commits

Author SHA1 Message Date
Claude
25f44828d7 docs(shmem): document that sender and receiver must use the same kind of type
- shmem uses one metadata format for a single message and another for
  a multipart message; Receive(Parts) of a single send, or
  Receive(MessagePtr) of a multipart send, gives wrong metadata or a
  crash
- Add a sender/receiver table to the messages page of the
  documentation and a note to Channel::Receive()
- Update the source line links into Channel.h
- Keep PartsTransfer.SingleSendMultipartReceive disabled: a fix
  changes the shmem wire format

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-09 15:42:53 +01:00
Claude
102cdaf40e fix(shmem): refuse to send an empty Parts
- zeromq refuses an empty Parts with TransferCode::error; shmem sent a
  message with zero parts and returned 0, and the receiver got a
  Receive() with zero parts
- Refuse it in shmem too, with the same warning
- Enable PartsTransfer.EmptyPartsIsRefused
- Update the documentation pages that described the defect, and
  the source line links into the changed files

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-09 15:42:53 +01:00
Claude
cc3297b2fd test(parts): add tests for Parts access and pmr messages on all transports
- Parts: variadic constructor, At() and operator[] (const and not),
  At() out of range throws, Empty(), Clear(), move
- Transfer of Parts with an empty part on all transports
- A pmr container from the transport memory resource becomes a message
  without a copy and transfers its data, on all transports
- Add disabled tests for two known defects: zeromq refuses an empty
  Parts and shmem sends it; shmem Receive(Parts) of a single-message
  Send() reads the message size as the number of parts and crashes

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-03 17:00:01 +01:00
Claude
f1ae05b45c test: use comparison assertions that print both values
- EXPECT_EQ/EXPECT_NE instead of EXPECT_TRUE(a == b) in the parts,
  memory resource and plugin manager tests; split the && checks
- ASSERT_NE on the message pointer before it is dereferenced
- ASSERT_TRUE/ASSERT_FALSE instead of ASSERT_EQ(x, true/false)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-03 17:00:01 +01:00
Dennis Klein
a58b4870d7 feat(Parts): Refine and tweak
* Optimize appending another Parts container
* Remove redundant/verbose comments
* Change r-value args to move-only types into l-value args for
  readability
* Deprecate `AtRef(int)`, redundant, just dereference at call site
* Deprecate `AddPart(Message*)`, avoid owning raw pointer args
* Add various const overloads
* Add `Empty()` and `Clear()` member functions
* Add `noexcept` where applicable
2023-02-24 13:59:27 +01:00
Alexey Rybalchenko
bfd08bb33f Don't use to-be-deprecated names 2022-01-24 06:40:24 +01:00
Alexey Rybalchenko
9444de5868 Apply readability-redundant-member-init 2021-05-28 13:14:51 +02:00
Alexey Rybalchenko
5397cef9d1 Use same runner.cxx/.h for all tests 2018-09-20 14:05:44 +02:00
Dennis Klein
2327fd2115 Move test directory one up 2018-04-12 17:46:18 +02:00