Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 86a8d340 authored by Alex Vakulenko's avatar Alex Vakulenko
Browse files

libpdx: Fix ThreadLocalBufferTest.InitialValue unittest

A call to GetBuffer() has been inadvertently removed during code
upstreaming to master. See the BUG below for more details.

Bug: 36456321
Test: `pdx_tests` now succeed on Sailfish
Change-Id: Ic7d6ecbbd9b0e59e74b48a66a9e3701dc44695bc
parent 5ea0fe13
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -89,13 +89,13 @@ TEST(ThreadLocalBufferTest, ThreadSlots) {
  EXPECT_NE(id1, id2);
}

// TODO(b/36456321): Fix this and enable it again.
// Tests that thread-local buffers are allocated at the first buffer request.
TEST(ThreadLocalBufferTest, DISABLED_InitialValue) {
TEST(ThreadLocalBufferTest, InitialValue) {
  struct TypeTagX;
  using SendSlotX = ThreadLocalSlot<TypeTagX, kSendBufferIndex>;

  auto value1 = ThreadLocalBufferTest::GetSlotValue<SendSlotX>();
  MessageBuffer<SendSlotX>::GetBuffer();
  auto value2 = ThreadLocalBufferTest::GetSlotValue<SendSlotX>();

  EXPECT_EQ(0U, value1);