Page Menu
Home
Xreate
Search
Configure Global Search
Log In
Docs
Questions
Repository
Issues
Patches
Internal API
Files
F4002257
communication.cpp
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Thu, Jul 9, 7:16 AM
Size
1 KB
Mime Type
text/x-c
Expires
Sat, Jul 11, 7:16 AM (1 d, 1 h)
Engine
blob
Format
Raw Data
Handle
273556
Attached To
rXR Xreate
communication.cpp
View Options
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/
*
* communication.cpp
*
* Author: pgess <v.melnychenko@xreate.org>
* Created on October 14, 2017, 5:24 PM
*/
#include "xreatemanager.h"
#include "gtest/gtest.h"
using namespace xreate;
TEST(Communication, ast1){
FILE* script = fopen("scripts/effects-communication/example1-wr.xreate", "r");
std::unique_ptr<XreateManager> program(XreateManager::prepare(script));
ASSERT_TRUE(true);
fclose(script);
}
TEST(Communication, Analysis1){
FILE* script = fopen("scripts/effects-communication/example1-wr.xreate", "r");
std::unique_ptr<details::tier1::XreateManager> program(details::tier1::XreateManager::prepare(script));
fclose(script);
program->analyse();
ASSERT_TRUE(true);
}
TEST(Communication, FullOnlyDirect1){
FILE* script = fopen("scripts/effects-communication/example1-wr.xreate", "r");
std::unique_ptr<XreateManager> program(XreateManager::prepare(script));
fclose(script);
int (*programEntry)() = (int (*)())program->run();
int result = programEntry();
ASSERT_EQ(1, result);
}
TEST(Communication, FullDirectAndGuarded1){
FILE* script = fopen("scripts/effects-communication/example2-wr.xreate", "r");
std::unique_ptr<XreateManager> program(XreateManager::prepare(script));
fclose(script);
int (*programEntry)() = (int (*)())program->run();
int result = programEntry();
ASSERT_EQ(1, result);
}
Event Timeline
Log In to Comment