Skip to content

Commit 0630b58

Browse files
committed
Update platform specific tests
1 parent bb364de commit 0630b58

File tree

4 files changed

+24
-52
lines changed

4 files changed

+24
-52
lines changed

test/unit_testing/tests/Sys/intended-Linux/include/dynamic/Dynamic_HxArray.h

Lines changed: 8 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -91,14 +91,8 @@ class Dynamic_std_deque<std::deque<T>> {
9191
auto result = [o, args] {
9292
auto x = args[0].asType<T>();
9393
{
94-
int tempNumber = 0;
95-
96-
{
97-
int fromIndex = 0;
98-
99-
tempNumber = HxArray::indexOf<T>(o, x, fromIndex);
100-
};
101-
94+
int fromIndex = 0;
95+
int tempNumber = HxArray::indexOf<T>(o, x, fromIndex);
10296
int index = tempNumber;
10397

10498
if(index < 0) {
@@ -126,20 +120,14 @@ class Dynamic_std_deque<std::deque<T>> {
126120
return Dynamic::makeFunc<std::deque<T>>(d, [](std::deque<T>* o, std::deque<Dynamic> args) {
127121
auto result = [o, args] {
128122
std::shared_ptr<std::deque<T>> result = std::make_shared<std::deque<T>>(std::deque<T>{});
123+
int _g = 0;
124+
std::deque<T>* _g1 = o;
129125

130-
{
131-
int _g = 0;
132-
std::deque<T>* _g1 = o;
133-
134-
while(_g < (int)(_g1->size())) {
135-
T obj = (*_g1)[_g];
126+
while(_g < (int)(_g1->size())) {
127+
T obj = (*_g1)[_g];
136128

137-
++_g;
138-
139-
{
140-
result->push_back(obj);
141-
};
142-
};
129+
++_g;
130+
result->push_back(obj);
143131
};
144132

145133
return result;

test/unit_testing/tests/Sys/intended-Linux/include/dynamic/Dynamic_HxString.h

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -69,12 +69,10 @@ class Dynamic_std_string {
6969
{
7070
std::string tempResult;
7171

72-
{
73-
if(endIndex < 0) {
74-
tempResult = o->substr(startIndex);
75-
} else {
76-
tempResult = o->substr(startIndex, endIndex - startIndex);
77-
};
72+
if(endIndex < 0) {
73+
tempResult = o->substr(startIndex);
74+
} else {
75+
tempResult = o->substr(startIndex, endIndex - startIndex);
7876
};
7977

8078
return tempResult;

test/unit_testing/tests/Sys/intended-Mac/include/dynamic/Dynamic_HxArray.h

Lines changed: 8 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -91,14 +91,8 @@ class Dynamic_std_deque<std::deque<T>> {
9191
auto result = [o, args] {
9292
auto x = args[0].asType<T>();
9393
{
94-
int tempNumber = 0;
95-
96-
{
97-
int fromIndex = 0;
98-
99-
tempNumber = HxArray::indexOf<T>(o, x, fromIndex);
100-
};
101-
94+
int fromIndex = 0;
95+
int tempNumber = HxArray::indexOf<T>(o, x, fromIndex);
10296
int index = tempNumber;
10397

10498
if(index < 0) {
@@ -126,20 +120,14 @@ class Dynamic_std_deque<std::deque<T>> {
126120
return Dynamic::makeFunc<std::deque<T>>(d, [](std::deque<T>* o, std::deque<Dynamic> args) {
127121
auto result = [o, args] {
128122
std::shared_ptr<std::deque<T>> result = std::make_shared<std::deque<T>>(std::deque<T>{});
123+
int _g = 0;
124+
std::deque<T>* _g1 = o;
129125

130-
{
131-
int _g = 0;
132-
std::deque<T>* _g1 = o;
133-
134-
while(_g < (int)(_g1->size())) {
135-
T obj = (*_g1)[_g];
126+
while(_g < (int)(_g1->size())) {
127+
T obj = (*_g1)[_g];
136128

137-
++_g;
138-
139-
{
140-
result->push_back(obj);
141-
};
142-
};
129+
++_g;
130+
result->push_back(obj);
143131
};
144132

145133
return result;

test/unit_testing/tests/Sys/intended-Mac/include/dynamic/Dynamic_HxString.h

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -69,12 +69,10 @@ class Dynamic_std_string {
6969
{
7070
std::string tempResult;
7171

72-
{
73-
if(endIndex < 0) {
74-
tempResult = o->substr(startIndex);
75-
} else {
76-
tempResult = o->substr(startIndex, endIndex - startIndex);
77-
};
72+
if(endIndex < 0) {
73+
tempResult = o->substr(startIndex);
74+
} else {
75+
tempResult = o->substr(startIndex, endIndex - startIndex);
7876
};
7977

8078
return tempResult;

0 commit comments

Comments
 (0)