Skip to content

Commit 7c80ffa

Browse files
committed
[Poincare] Restore Poincare::Init() for tests to pass
1 parent 8b837aa commit 7c80ffa

2 files changed

Lines changed: 10 additions & 0 deletions

File tree

‎poincare/include/poincare/init.h‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33

44
namespace Poincare {
55

6+
void Init();
7+
68
void Tidy();
79

810
}

‎poincare/src/init.cpp‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,14 @@
55

66
namespace Poincare {
77

8+
void Init() {
9+
// Create and register the shared static pool
10+
// Shouldn't be used on the physical calculator due to per-app initialization,
11+
// but required for tests
12+
static TreePool pool;
13+
TreePool::RegisterPool(&pool);
14+
}
15+
816
void Tidy() {
917
// Clean Expression (reset the SymbolReplacementsLock)
1018
Expression::Tidy();

0 commit comments

Comments
 (0)