Page Menu
Home
Xreate
Search
Configure Global Search
Log In
Docs
Questions
Repository
Issues
Patches
Internal API
Files
F4000706
adhoc-skipdetection.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, 4:38 AM
Size
807 B
Mime Type
text/x-c++
Expires
Sat, Jul 11, 4:38 AM (1 d, 4 h)
Engine
blob
Format
Raw Data
Handle
272831
Attached To
rXR Xreate
adhoc-skipdetection.cpp
View Options
/*
* skipdetection.cpp
*
* Created on: Jul 10, 2015
* Author: pgess
*/
#include "passmanager.h"
#include "clasplayer.h"
#include "gtest/gtest.h"
using namespace xreate;
using namespace std;
TEST(SkipDetection, testNoneValueTagExists){
PassManager* man = PassManager::prepareForCode
("test = function():: int; entry {\n"
" data = [1..5]::[int].\n"
" \n"
" result = loop fold(data->i::int, 0->sum::int)::int{\n"
" if (i==3)::int {valNull = null. valNull} else {i+sum}\n"
" }.\n"
" \n"
" result\n"
"}");
man->runWithoutCompilation();
ClaspLayer::ModelFragment answer = man->clasp->query(Config::get("clasp.nonevalue"));
int countNoneValue = 0;
if (answer)
countNoneValue = std::distance(answer->first, answer->second);
EXPECT_EQ(1, countNoneValue);
}
Event Timeline
Log In to Comment