Files
Upsilon/test.cpp
2018-06-27 16:17:13 +02:00

44 lines
966 B
C++

#include "float_node.h"
#include "char_layout_node.h"
#include "horizontal_layout_node.h"
#include "addition_node.h"
#include "cursor.h"
#include <stdio.h>
Addition buildAddition() {
Float smallFloat(0.2f);
Float bigFloat(3.4f);
Addition a(smallFloat, bigFloat);
TreePool::sharedPool()->log();
return a;
}
int main() {
/*Addition a = buildAddition();
float result = a.approximate();
Float smallFloat(1.3f);
a.replaceChildAtIndex(0, smallFloat);
float result2 = a.approximate();
a.swapChildren(1,0);
TreePool::sharedPool()->log();*/
printf("\nCHAR LAYOUT\n");
CharLayout aChar('c');
CharLayout bChar('b');
TreePool::sharedPool()->log();
HorizontalLayout h(aChar, bChar);
TreePool::sharedPool()->log();
LayoutCursor cursor = h.childAtIndex(1).cursor();
cursor.log();
/*cursor.log();
bool recompute = false;
cursor.moveLeft(&recompute);
cursor.log();
cursor.moveRight(&recompute);
cursor.log();*/
return 0;
}