MCPcopy Create free account
hub / github.com/dds-bridge/dds / TEST

Function TEST

library/tests/system/context_tt_facade_test.cpp:16–33  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

14extern Memory memory;
15
16TEST(SystemContextTTFacades, ResetAndResizeAreNoopsWithoutTT)
17{
18 SetMaxThreads(1);
19 // Some environments may compute 0 allowable threads (e.g., macOS sandbox),
20 // so ensure we have at least one thread allocated for the test.
21 if (memory.NumThreads() == 0)
22 memory.Resize(1, DDS_TT_SMALL, THREADMEM_SMALL_DEF_MB, THREADMEM_SMALL_MAX_MB);
23 // Create a context that owns its ThreadData for this test.
24 SolverContext ctx;
25 // Ensure no TT yet (construction is lazy until first use)
26 ASSERT_EQ(nullptr, ctx.maybe_trans_table());
27 // Should not crash and should not create TT
28 ctx.reset_for_solve();
29 ctx.clear_tt();
30 ctx.resize_tt(8, 16);
31
32 EXPECT_EQ(nullptr, ctx.maybe_trans_table());
33}
34
35TEST(SystemContextTTFacades, ResizeCreatesWhenExisting)
36{

Callers

nothing calls this directly

Calls 12

SetMaxThreadsFunction · 0.85
NumThreadsMethod · 0.80
ResizeMethod · 0.80
maybe_trans_tableMethod · 0.80
reset_for_solveMethod · 0.80
clear_ttMethod · 0.80
resize_ttMethod · 0.80
trans_tableMethod · 0.80
dispose_trans_tableMethod · 0.80
initMethod · 0.45
lookupMethod · 0.45
addMethod · 0.45

Tested by

no test coverage detected