estyle/test/testBlock.cpp

1530 lines
73 KiB
C++

/**
* @author Edouard DUPIN
* @copyright 2017, Edouard DUPIN, all right reserved
* @license MPL-2 (see license file)
*/
#include <estyle/estyle.hpp>
#include <estyle/Generator.hpp>
#include <etk/etk.hpp>
#include <test-debug/debug.hpp>
#include <etest/etest.hpp>
static etk::String sourceBrace0Action = "action_A;{}action_D;";
static etk::String sourceBrace1Action = "action_A;{action_B;}action_D;";
TEST(testBlock, brace_100000) {
estyle::Generator interface;
// in:
interface.properties.set("brace-block-in-new-line-before", "true");
//interface.properties.set("brace-block-in-new-line-after", "true");
//interface.properties.set("brace-block-in-space-before", "true");
//interface.properties.set("brace-block-in-space-after", "true");
//interface.properties.set("brace-block-in-indent-before", "true");
//interface.properties.set("brace-block-in-indent-after", "true");
// out:
interface.properties.set("brace-block-out-new-line-before", "true");
//interface.properties.set("brace-block-out-new-line-after", "true");
//interface.properties.set("brace-block-out-space-before", "true");
//interface.properties.set("brace-block-out-space-after", "true");
//interface.properties.set("brace-block-out-unindent-after", "true");
//interface.properties.set("brace-block-out-unindent-before", "true");
// single:
//interface.properties.set("brace-block-single", "true");
etk::String outRef = "action_A;\n{action_B;\n}action_D;";
etk::String output = interface.process(sourceBrace1Action);
EXPECT_EQ(output, outRef);
}
TEST(testBlock, brace_101000) {
estyle::Generator interface;
// in:
interface.properties.set("brace-block-in-new-line-before", "true");
//interface.properties.set("brace-block-in-new-line-after", "true");
interface.properties.set("brace-block-in-space-before", "true");
//interface.properties.set("brace-block-in-space-after", "true");
//interface.properties.set("brace-block-in-indent-before", "true");
//interface.properties.set("brace-block-in-indent-after", "true");
// out:
interface.properties.set("brace-block-out-new-line-before", "true");
//interface.properties.set("brace-block-out-new-line-after", "true");
interface.properties.set("brace-block-out-space-before", "true");
//interface.properties.set("brace-block-out-space-after", "true");
//interface.properties.set("brace-block-out-unindent-after", "true");
//interface.properties.set("brace-block-out-unindent-before", "true");
// single:
//interface.properties.set("brace-block-single", "true");
etk::String outRef = "action_A;\n{action_B;\n}action_D;";
etk::String output = interface.process(sourceBrace1Action);
EXPECT_EQ(output, outRef);
}
TEST(testBlock, brace_101100) {
estyle::Generator interface;
// in:
interface.properties.set("brace-block-in-new-line-before", "true");
//interface.properties.set("brace-block-in-new-line-after", "true");
interface.properties.set("brace-block-in-space-before", "true");
interface.properties.set("brace-block-in-space-after", "true");
//interface.properties.set("brace-block-in-indent-before", "true");
//interface.properties.set("brace-block-in-indent-after", "true");
// out:
interface.properties.set("brace-block-out-new-line-before", "true");
//interface.properties.set("brace-block-out-new-line-after", "true");
interface.properties.set("brace-block-out-space-before", "true");
interface.properties.set("brace-block-out-space-after", "true");
//interface.properties.set("brace-block-out-unindent-after", "true");
//interface.properties.set("brace-block-out-unindent-before", "true");
// single:
//interface.properties.set("brace-block-single", "true");
etk::String outRef = "action_A;\n{ action_B;\n} action_D;";
etk::String output = interface.process(sourceBrace1Action);
EXPECT_EQ(output, outRef);
}
TEST(testBlock, brace_110000) {
estyle::Generator interface;
// in:
interface.properties.set("brace-block-in-new-line-before", "true");
interface.properties.set("brace-block-in-new-line-after", "true");
//interface.properties.set("brace-block-in-space-before", "true");
//interface.properties.set("brace-block-in-space-after", "true");
//interface.properties.set("brace-block-in-indent-before", "true");
//interface.properties.set("brace-block-in-indent-after", "true");
// out:
interface.properties.set("brace-block-out-new-line-before", "true");
interface.properties.set("brace-block-out-new-line-after", "true");
//interface.properties.set("brace-block-out-space-before", "true");
//interface.properties.set("brace-block-out-space-after", "true");
//interface.properties.set("brace-block-out-unindent-after", "true");
//interface.properties.set("brace-block-out-unindent-before", "true");
// single:
//interface.properties.set("brace-block-single", "true");
etk::String outRef = "action_A;\n{\naction_B;\n}\naction_D;";
etk::String output = interface.process(sourceBrace1Action);
EXPECT_EQ(output, outRef);
}
TEST(testBlock, brace_110100) {
estyle::Generator interface;
// in:
interface.properties.set("brace-block-in-new-line-before", "true");
interface.properties.set("brace-block-in-new-line-after", "true");
//interface.properties.set("brace-block-in-space-before", "true");
interface.properties.set("brace-block-in-space-after", "true");
//interface.properties.set("brace-block-in-indent-before", "true");
//interface.properties.set("brace-block-in-indent-after", "true");
// out:
interface.properties.set("brace-block-out-new-line-before", "true");
interface.properties.set("brace-block-out-new-line-after", "true");
//interface.properties.set("brace-block-out-space-before", "true");
interface.properties.set("brace-block-out-space-after", "true");
//interface.properties.set("brace-block-out-unindent-after", "true");
//interface.properties.set("brace-block-out-unindent-before", "true");
// single:
//interface.properties.set("brace-block-single", "true");
etk::String outRef = "action_A;\n{\naction_B;\n}\naction_D;";
etk::String output = interface.process(sourceBrace1Action);
EXPECT_EQ(output, outRef);
}
TEST(testBlock, brace_111000) {
estyle::Generator interface;
// in:
interface.properties.set("brace-block-in-new-line-before", "true");
interface.properties.set("brace-block-in-new-line-after", "true");
interface.properties.set("brace-block-in-space-before", "true");
//interface.properties.set("brace-block-in-space-after", "true");
//interface.properties.set("brace-block-in-indent-before", "true");
//interface.properties.set("brace-block-in-indent-after", "true");
// out:
interface.properties.set("brace-block-out-new-line-before", "true");
interface.properties.set("brace-block-out-new-line-after", "true");
interface.properties.set("brace-block-out-space-before", "true");
//interface.properties.set("brace-block-out-space-after", "true");
//interface.properties.set("brace-block-out-unindent-after", "true");
//interface.properties.set("brace-block-out-unindent-before", "true");
// single:
//interface.properties.set("brace-block-single", "true");
etk::String outRef = "action_A;\n{\naction_B;\n}\naction_D;";
etk::String output = interface.process(sourceBrace1Action);
EXPECT_EQ(output, outRef);
}
TEST(testBlock, brace_111100) {
estyle::Generator interface;
// in:
interface.properties.set("brace-block-in-new-line-before", "true");
interface.properties.set("brace-block-in-new-line-after", "true");
interface.properties.set("brace-block-in-space-before", "true");
interface.properties.set("brace-block-in-space-after", "true");
//interface.properties.set("brace-block-in-indent-before", "true");
//interface.properties.set("brace-block-in-indent-after", "true");
// out:
interface.properties.set("brace-block-out-new-line-before", "true");
interface.properties.set("brace-block-out-new-line-after", "true");
interface.properties.set("brace-block-out-space-before", "true");
interface.properties.set("brace-block-out-space-after", "true");
//interface.properties.set("brace-block-out-unindent-after", "true");
//interface.properties.set("brace-block-out-unindent-before", "true");
// single:
//interface.properties.set("brace-block-single", "true");
etk::String outRef = "action_A;\n{\naction_B;\n}\naction_D;";
etk::String output = interface.process(sourceBrace1Action);
EXPECT_EQ(output, outRef);
}
TEST(testBlock, brace_100100) {
estyle::Generator interface;
// in:
interface.properties.set("brace-block-in-new-line-before", "true");
//interface.properties.set("brace-block-in-new-line-after", "true");
//interface.properties.set("brace-block-in-space-before", "true");
interface.properties.set("brace-block-in-space-after", "true");
//interface.properties.set("brace-block-in-indent-before", "true");
//interface.properties.set("brace-block-in-indent-after", "true");
// out:
interface.properties.set("brace-block-out-new-line-before", "true");
//interface.properties.set("brace-block-out-new-line-after", "true");
//interface.properties.set("brace-block-out-space-before", "true");
interface.properties.set("brace-block-out-space-after", "true");
//interface.properties.set("brace-block-out-unindent-after", "true");
//interface.properties.set("brace-block-out-unindent-before", "true");
// single:
//interface.properties.set("brace-block-single", "true");
etk::String outRef = "action_A;\n{ action_B;\n} action_D;";
etk::String output = interface.process(sourceBrace1Action);
EXPECT_EQ(output, outRef);
}
TEST(testBlock, brace_010000) {
estyle::Generator interface;
// in:
//interface.properties.set("brace-block-in-new-line-before", "true");
interface.properties.set("brace-block-in-new-line-after", "true");
//interface.properties.set("brace-block-in-space-before", "true");
//interface.properties.set("brace-block-in-space-after", "true");
//interface.properties.set("brace-block-in-indent-before", "true");
//interface.properties.set("brace-block-in-indent-after", "true");
// out:
//interface.properties.set("brace-block-out-new-line-before", "true");
interface.properties.set("brace-block-out-new-line-after", "true");
//interface.properties.set("brace-block-out-space-before", "true");
//interface.properties.set("brace-block-out-space-after", "true");
//interface.properties.set("brace-block-out-unindent-after", "true");
//interface.properties.set("brace-block-out-unindent-before", "true");
// single:
//interface.properties.set("brace-block-single", "true");
etk::String outRef = "action_A;{\naction_B;}\naction_D;";
etk::String output = interface.process(sourceBrace1Action);
EXPECT_EQ(output, outRef);
}
TEST(testBlock, brace_010100) {
estyle::Generator interface;
// in:
//interface.properties.set("brace-block-in-new-line-before", "true");
interface.properties.set("brace-block-in-new-line-after", "true");
//interface.properties.set("brace-block-in-space-before", "true");
interface.properties.set("brace-block-in-space-after", "true");
//interface.properties.set("brace-block-in-indent-before", "true");
//interface.properties.set("brace-block-in-indent-after", "true");
// out:
//interface.properties.set("brace-block-out-new-line-before", "true");
interface.properties.set("brace-block-out-new-line-after", "true");
//interface.properties.set("brace-block-out-space-before", "true");
interface.properties.set("brace-block-out-space-after", "true");
//interface.properties.set("brace-block-out-unindent-after", "true");
//interface.properties.set("brace-block-out-unindent-before", "true");
// single:
//interface.properties.set("brace-block-single", "true");
etk::String outRef = "action_A;{\naction_B;}\naction_D;";
etk::String output = interface.process(sourceBrace1Action);
EXPECT_EQ(output, outRef);
}
TEST(testBlock, brace_011000) {
estyle::Generator interface;
// in:
//interface.properties.set("brace-block-in-new-line-before", "true");
interface.properties.set("brace-block-in-new-line-after", "true");
interface.properties.set("brace-block-in-space-before", "true");
//interface.properties.set("brace-block-in-space-after", "true");
//interface.properties.set("brace-block-in-indent-before", "true");
//interface.properties.set("brace-block-in-indent-after", "true");
// out:
//interface.properties.set("brace-block-out-new-line-before", "true");
interface.properties.set("brace-block-out-new-line-after", "true");
interface.properties.set("brace-block-out-space-before", "true");
//interface.properties.set("brace-block-out-space-after", "true");
//interface.properties.set("brace-block-out-unindent-after", "true");
//interface.properties.set("brace-block-out-unindent-before", "true");
// single:
//interface.properties.set("brace-block-single", "true");
etk::String outRef = "action_A; {\naction_B; }\naction_D;";
etk::String output = interface.process(sourceBrace1Action);
EXPECT_EQ(output, outRef);
}
TEST(testBlock, brace_001000) {
estyle::Generator interface;
// in:
//interface.properties.set("brace-block-in-new-line-before", "true");
//interface.properties.set("brace-block-in-new-line-after", "true");
interface.properties.set("brace-block-in-space-before", "true");
//interface.properties.set("brace-block-in-space-after", "true");
//interface.properties.set("brace-block-in-indent-before", "true");
//interface.properties.set("brace-block-in-indent-after", "true");
// out:
//interface.properties.set("brace-block-out-new-line-before", "true");
//interface.properties.set("brace-block-out-new-line-after", "true");
interface.properties.set("brace-block-out-space-before", "true");
//interface.properties.set("brace-block-out-space-after", "true");
//interface.properties.set("brace-block-out-unindent-after", "true");
//interface.properties.set("brace-block-out-unindent-before", "true");
// single:
//interface.properties.set("brace-block-single", "true");
etk::String outRef = "action_A; {action_B; }action_D;";
etk::String output = interface.process(sourceBrace1Action);
EXPECT_EQ(output, outRef);
}
TEST(testBlock, brace_001100) {
estyle::Generator interface;
// in:
//interface.properties.set("brace-block-in-new-line-before", "true");
//interface.properties.set("brace-block-in-new-line-after", "true");
interface.properties.set("brace-block-in-space-before", "true");
interface.properties.set("brace-block-in-space-after", "true");
//interface.properties.set("brace-block-in-indent-before", "true");
//interface.properties.set("brace-block-in-indent-after", "true");
// out:
//interface.properties.set("brace-block-out-new-line-before", "true");
//interface.properties.set("brace-block-out-new-line-after", "true");
interface.properties.set("brace-block-out-space-before", "true");
interface.properties.set("brace-block-out-space-after", "true");
//interface.properties.set("brace-block-out-unindent-after", "true");
//interface.properties.set("brace-block-out-unindent-before", "true");
// single:
//interface.properties.set("brace-block-single", "true");
etk::String outRef = "action_A; { action_B; } action_D;";
etk::String output = interface.process(sourceBrace1Action);
EXPECT_EQ(output, outRef);
}
TEST(testBlock, brace_011100) {
estyle::Generator interface;
// in:
//interface.properties.set("brace-block-in-new-line-before", "true");
interface.properties.set("brace-block-in-new-line-after", "true");
interface.properties.set("brace-block-in-space-before", "true");
interface.properties.set("brace-block-in-space-after", "true");
//interface.properties.set("brace-block-in-indent-before", "true");
//interface.properties.set("brace-block-in-indent-after", "true");
// out:
//interface.properties.set("brace-block-out-new-line-before", "true");
interface.properties.set("brace-block-out-new-line-after", "true");
interface.properties.set("brace-block-out-space-before", "true");
interface.properties.set("brace-block-out-space-after", "true");
//interface.properties.set("brace-block-out-unindent-after", "true");
//interface.properties.set("brace-block-out-unindent-before", "true");
// single:
//interface.properties.set("brace-block-single", "true");
etk::String outRef = "action_A; {\naction_B; }\naction_D;";
etk::String output = interface.process(sourceBrace1Action);
EXPECT_EQ(output, outRef);
}
TEST(testBlock, brace_000100) {
estyle::Generator interface;
// in:
//interface.properties.set("brace-block-in-new-line-before", "true");
//interface.properties.set("brace-block-in-new-line-after", "true");
//interface.properties.set("brace-block-in-space-before", "true");
interface.properties.set("brace-block-in-space-after", "true");
//interface.properties.set("brace-block-in-indent-before", "true");
//interface.properties.set("brace-block-in-indent-after", "true");
// out:
//interface.properties.set("brace-block-out-new-line-before", "true");
//interface.properties.set("brace-block-out-new-line-after", "true");
//interface.properties.set("brace-block-out-space-before", "true");
interface.properties.set("brace-block-out-space-after", "true");
//interface.properties.set("brace-block-out-unindent-after", "true");
//interface.properties.set("brace-block-out-unindent-before", "true");
// single:
//interface.properties.set("brace-block-single", "true");
etk::String outRef = "action_A;{ action_B;} action_D;";
etk::String output = interface.process(sourceBrace1Action);
EXPECT_EQ(output, outRef);
}
/////////////////////////////////////////////////////////////////////////////////////////
TEST(testBlock, brace_100001) {
estyle::Generator interface;
// in:
interface.properties.set("brace-block-in-new-line-before", "true");
//interface.properties.set("brace-block-in-new-line-after", "true");
//interface.properties.set("brace-block-in-space-before", "true");
//interface.properties.set("brace-block-in-space-after", "true");
//interface.properties.set("brace-block-in-indent-before", "true");
interface.properties.set("brace-block-in-indent-after", "true");
// out:
interface.properties.set("brace-block-out-new-line-before", "true");
//interface.properties.set("brace-block-out-new-line-after", "true");
//interface.properties.set("brace-block-out-space-before", "true");
//interface.properties.set("brace-block-out-space-after", "true");
//interface.properties.set("brace-block-out-unindent-after", "true");
interface.properties.set("brace-block-out-unindent-before", "true");
// single:
//interface.properties.set("brace-block-single", "true");
etk::String outRef = "action_A;\n{action_B;\n}action_D;";
etk::String output = interface.process(sourceBrace1Action);
EXPECT_EQ(output, outRef);
}
TEST(testBlock, brace_101001) {
estyle::Generator interface;
// in:
interface.properties.set("brace-block-in-new-line-before", "true");
//interface.properties.set("brace-block-in-new-line-after", "true");
interface.properties.set("brace-block-in-space-before", "true");
//interface.properties.set("brace-block-in-space-after", "true");
//interface.properties.set("brace-block-in-indent-before", "true");
interface.properties.set("brace-block-in-indent-after", "true");
// out:
interface.properties.set("brace-block-out-new-line-before", "true");
//interface.properties.set("brace-block-out-new-line-after", "true");
interface.properties.set("brace-block-out-space-before", "true");
//interface.properties.set("brace-block-out-space-after", "true");
//interface.properties.set("brace-block-out-unindent-after", "true");
interface.properties.set("brace-block-out-unindent-before", "true");
// single:
//interface.properties.set("brace-block-single", "true");
etk::String outRef = "action_A;\n{action_B;\n}action_D;";
etk::String output = interface.process(sourceBrace1Action);
EXPECT_EQ(output, outRef);
}
TEST(testBlock, brace_101101) {
estyle::Generator interface;
// in:
interface.properties.set("brace-block-in-new-line-before", "true");
//interface.properties.set("brace-block-in-new-line-after", "true");
interface.properties.set("brace-block-in-space-before", "true");
interface.properties.set("brace-block-in-space-after", "true");
//interface.properties.set("brace-block-in-indent-before", "true");
interface.properties.set("brace-block-in-indent-after", "true");
// out:
interface.properties.set("brace-block-out-new-line-before", "true");
//interface.properties.set("brace-block-out-new-line-after", "true");
interface.properties.set("brace-block-out-space-before", "true");
interface.properties.set("brace-block-out-space-after", "true");
//interface.properties.set("brace-block-out-unindent-after", "true");
interface.properties.set("brace-block-out-unindent-before", "true");
// single:
//interface.properties.set("brace-block-single", "true");
etk::String outRef = "action_A;\n{ action_B;\n} action_D;";
etk::String output = interface.process(sourceBrace1Action);
EXPECT_EQ(output, outRef);
}
TEST(testBlock, brace_110001) {
estyle::Generator interface;
// in:
interface.properties.set("brace-block-in-new-line-before", "true");
interface.properties.set("brace-block-in-new-line-after", "true");
//interface.properties.set("brace-block-in-space-before", "true");
//interface.properties.set("brace-block-in-space-after", "true");
//interface.properties.set("brace-block-in-indent-before", "true");
interface.properties.set("brace-block-in-indent-after", "true");
// out:
interface.properties.set("brace-block-out-new-line-before", "true");
interface.properties.set("brace-block-out-new-line-after", "true");
//interface.properties.set("brace-block-out-space-before", "true");
//interface.properties.set("brace-block-out-space-after", "true");
//interface.properties.set("brace-block-out-unindent-after", "true");
interface.properties.set("brace-block-out-unindent-before", "true");
// single:
//interface.properties.set("brace-block-single", "true");
etk::String outRef = "action_A;\n{\n\taction_B;\n}\naction_D;";
etk::String output = interface.process(sourceBrace1Action);
EXPECT_EQ(output, outRef);
}
TEST(testBlock, brace_110101) {
estyle::Generator interface;
// in:
interface.properties.set("brace-block-in-new-line-before", "true");
interface.properties.set("brace-block-in-new-line-after", "true");
//interface.properties.set("brace-block-in-space-before", "true");
interface.properties.set("brace-block-in-space-after", "true");
//interface.properties.set("brace-block-in-indent-before", "true");
interface.properties.set("brace-block-in-indent-after", "true");
// out:
interface.properties.set("brace-block-out-new-line-before", "true");
interface.properties.set("brace-block-out-new-line-after", "true");
//interface.properties.set("brace-block-out-space-before", "true");
interface.properties.set("brace-block-out-space-after", "true");
//interface.properties.set("brace-block-out-unindent-after", "true");
interface.properties.set("brace-block-out-unindent-before", "true");
// single:
//interface.properties.set("brace-block-single", "true");
etk::String outRef = "action_A;\n{\n\taction_B;\n}\naction_D;";
etk::String output = interface.process(sourceBrace1Action);
EXPECT_EQ(output, outRef);
}
TEST(testBlock, brace_111001) {
estyle::Generator interface;
// in:
interface.properties.set("brace-block-in-new-line-before", "true");
interface.properties.set("brace-block-in-new-line-after", "true");
interface.properties.set("brace-block-in-space-before", "true");
//interface.properties.set("brace-block-in-space-after", "true");
//interface.properties.set("brace-block-in-indent-before", "true");
interface.properties.set("brace-block-in-indent-after", "true");
// out:
interface.properties.set("brace-block-out-new-line-before", "true");
interface.properties.set("brace-block-out-new-line-after", "true");
interface.properties.set("brace-block-out-space-before", "true");
//interface.properties.set("brace-block-out-space-after", "true");
//interface.properties.set("brace-block-out-unindent-after", "true");
interface.properties.set("brace-block-out-unindent-before", "true");
// single:
//interface.properties.set("brace-block-single", "true");
etk::String outRef = "action_A;\n{\n\taction_B;\n}\naction_D;";
etk::String output = interface.process(sourceBrace1Action);
EXPECT_EQ(output, outRef);
}
TEST(testBlock, brace_111101) {
estyle::Generator interface;
// in:
interface.properties.set("brace-block-in-new-line-before", "true");
interface.properties.set("brace-block-in-new-line-after", "true");
interface.properties.set("brace-block-in-space-before", "true");
interface.properties.set("brace-block-in-space-after", "true");
//interface.properties.set("brace-block-in-indent-before", "true");
interface.properties.set("brace-block-in-indent-after", "true");
// out:
interface.properties.set("brace-block-out-new-line-before", "true");
interface.properties.set("brace-block-out-new-line-after", "true");
interface.properties.set("brace-block-out-space-before", "true");
interface.properties.set("brace-block-out-space-after", "true");
//interface.properties.set("brace-block-out-unindent-after", "true");
interface.properties.set("brace-block-out-unindent-before", "true");
// single:
//interface.properties.set("brace-block-single", "true");
etk::String outRef = "action_A;\n{\n\taction_B;\n}\naction_D;";
etk::String output = interface.process(sourceBrace1Action);
EXPECT_EQ(output, outRef);
}
TEST(testBlock, brace_100101) {
estyle::Generator interface;
// in:
interface.properties.set("brace-block-in-new-line-before", "true");
//interface.properties.set("brace-block-in-new-line-after", "true");
//interface.properties.set("brace-block-in-space-before", "true");
interface.properties.set("brace-block-in-space-after", "true");
//interface.properties.set("brace-block-in-indent-before", "true");
interface.properties.set("brace-block-in-indent-after", "true");
// out:
interface.properties.set("brace-block-out-new-line-before", "true");
//interface.properties.set("brace-block-out-new-line-after", "true");
//interface.properties.set("brace-block-out-space-before", "true");
interface.properties.set("brace-block-out-space-after", "true");
//interface.properties.set("brace-block-out-unindent-after", "true");
interface.properties.set("brace-block-out-unindent-before", "true");
// single:
//interface.properties.set("brace-block-single", "true");
etk::String outRef = "action_A;\n{ action_B;\n} action_D;";
etk::String output = interface.process(sourceBrace1Action);
EXPECT_EQ(output, outRef);
}
TEST(testBlock, brace_010001) {
estyle::Generator interface;
// in:
//interface.properties.set("brace-block-in-new-line-before", "true");
interface.properties.set("brace-block-in-new-line-after", "true");
//interface.properties.set("brace-block-in-space-before", "true");
//interface.properties.set("brace-block-in-space-after", "true");
//interface.properties.set("brace-block-in-indent-before", "true");
interface.properties.set("brace-block-in-indent-after", "true");
// out:
//interface.properties.set("brace-block-out-new-line-before", "true");
interface.properties.set("brace-block-out-new-line-after", "true");
//interface.properties.set("brace-block-out-space-before", "true");
//interface.properties.set("brace-block-out-space-after", "true");
//interface.properties.set("brace-block-out-unindent-after", "true");
interface.properties.set("brace-block-out-unindent-before", "true");
// single:
//interface.properties.set("brace-block-single", "true");
etk::String outRef = "action_A;{\n\taction_B;}\naction_D;";
etk::String output = interface.process(sourceBrace1Action);
EXPECT_EQ(output, outRef);
}
TEST(testBlock, brace_010101) {
estyle::Generator interface;
// in:
//interface.properties.set("brace-block-in-new-line-before", "true");
interface.properties.set("brace-block-in-new-line-after", "true");
//interface.properties.set("brace-block-in-space-before", "true");
interface.properties.set("brace-block-in-space-after", "true");
//interface.properties.set("brace-block-in-indent-before", "true");
interface.properties.set("brace-block-in-indent-after", "true");
// out:
//interface.properties.set("brace-block-out-new-line-before", "true");
interface.properties.set("brace-block-out-new-line-after", "true");
//interface.properties.set("brace-block-out-space-before", "true");
interface.properties.set("brace-block-out-space-after", "true");
//interface.properties.set("brace-block-out-unindent-after", "true");
interface.properties.set("brace-block-out-unindent-before", "true");
// single:
//interface.properties.set("brace-block-single", "true");
etk::String outRef = "action_A;{\n\taction_B;}\naction_D;";
etk::String output = interface.process(sourceBrace1Action);
EXPECT_EQ(output, outRef);
}
TEST(testBlock, brace_011001) {
estyle::Generator interface;
// in:
//interface.properties.set("brace-block-in-new-line-before", "true");
interface.properties.set("brace-block-in-new-line-after", "true");
interface.properties.set("brace-block-in-space-before", "true");
//interface.properties.set("brace-block-in-space-after", "true");
//interface.properties.set("brace-block-in-indent-before", "true");
interface.properties.set("brace-block-in-indent-after", "true");
// out:
//interface.properties.set("brace-block-out-new-line-before", "true");
interface.properties.set("brace-block-out-new-line-after", "true");
interface.properties.set("brace-block-out-space-before", "true");
//interface.properties.set("brace-block-out-space-after", "true");
//interface.properties.set("brace-block-out-unindent-after", "true");
interface.properties.set("brace-block-out-unindent-before", "true");
// single:
//interface.properties.set("brace-block-single", "true");
etk::String outRef = "action_A; {\n\taction_B; }\naction_D;";
etk::String output = interface.process(sourceBrace1Action);
EXPECT_EQ(output, outRef);
}
TEST(testBlock, brace_001001) {
estyle::Generator interface;
// in:
//interface.properties.set("brace-block-in-new-line-before", "true");
//interface.properties.set("brace-block-in-new-line-after", "true");
interface.properties.set("brace-block-in-space-before", "true");
//interface.properties.set("brace-block-in-space-after", "true");
//interface.properties.set("brace-block-in-indent-before", "true");
interface.properties.set("brace-block-in-indent-after", "true");
// out:
//interface.properties.set("brace-block-out-new-line-before", "true");
//interface.properties.set("brace-block-out-new-line-after", "true");
interface.properties.set("brace-block-out-space-before", "true");
//interface.properties.set("brace-block-out-space-after", "true");
//interface.properties.set("brace-block-out-unindent-after", "true");
interface.properties.set("brace-block-out-unindent-before", "true");
// single:
//interface.properties.set("brace-block-single", "true");
etk::String outRef = "action_A; {action_B; }action_D;";
etk::String output = interface.process(sourceBrace1Action);
EXPECT_EQ(output, outRef);
}
TEST(testBlock, brace_001101) {
estyle::Generator interface;
// in:
//interface.properties.set("brace-block-in-new-line-before", "true");
//interface.properties.set("brace-block-in-new-line-after", "true");
interface.properties.set("brace-block-in-space-before", "true");
interface.properties.set("brace-block-in-space-after", "true");
//interface.properties.set("brace-block-in-indent-before", "true");
interface.properties.set("brace-block-in-indent-after", "true");
// out:
//interface.properties.set("brace-block-out-new-line-before", "true");
//interface.properties.set("brace-block-out-new-line-after", "true");
interface.properties.set("brace-block-out-space-before", "true");
interface.properties.set("brace-block-out-space-after", "true");
//interface.properties.set("brace-block-out-unindent-after", "true");
interface.properties.set("brace-block-out-unindent-before", "true");
// single:
//interface.properties.set("brace-block-single", "true");
etk::String outRef = "action_A; { action_B; } action_D;";
etk::String output = interface.process(sourceBrace1Action);
EXPECT_EQ(output, outRef);
}
TEST(testBlock, brace_011101) {
estyle::Generator interface;
// in:
//interface.properties.set("brace-block-in-new-line-before", "true");
interface.properties.set("brace-block-in-new-line-after", "true");
interface.properties.set("brace-block-in-space-before", "true");
interface.properties.set("brace-block-in-space-after", "true");
//interface.properties.set("brace-block-in-indent-before", "true");
interface.properties.set("brace-block-in-indent-after", "true");
// out:
//interface.properties.set("brace-block-out-new-line-before", "true");
interface.properties.set("brace-block-out-new-line-after", "true");
interface.properties.set("brace-block-out-space-before", "true");
interface.properties.set("brace-block-out-space-after", "true");
//interface.properties.set("brace-block-out-unindent-after", "true");
interface.properties.set("brace-block-out-unindent-before", "true");
// single:
//interface.properties.set("brace-block-single", "true");
etk::String outRef = "action_A; {\n\taction_B; }\naction_D;";
etk::String output = interface.process(sourceBrace1Action);
EXPECT_EQ(output, outRef);
}
TEST(testBlock, brace_000101) {
estyle::Generator interface;
// in:
//interface.properties.set("brace-block-in-new-line-before", "true");
//interface.properties.set("brace-block-in-new-line-after", "true");
//interface.properties.set("brace-block-in-space-before", "true");
interface.properties.set("brace-block-in-space-after", "true");
//interface.properties.set("brace-block-in-indent-before", "true");
interface.properties.set("brace-block-in-indent-after", "true");
// out:
//interface.properties.set("brace-block-out-new-line-before", "true");
//interface.properties.set("brace-block-out-new-line-after", "true");
//interface.properties.set("brace-block-out-space-before", "true");
interface.properties.set("brace-block-out-space-after", "true");
//interface.properties.set("brace-block-out-unindent-after", "true");
interface.properties.set("brace-block-out-unindent-before", "true");
// single:
//interface.properties.set("brace-block-single", "true");
etk::String outRef = "action_A;{ action_B;} action_D;";
etk::String output = interface.process(sourceBrace1Action);
EXPECT_EQ(output, outRef);
}
/////////////////////////////////////////////////////////////////////////////////////////
TEST(testBlock, brace_100010) {
estyle::Generator interface;
// in:
interface.properties.set("brace-block-in-new-line-before", "true");
//interface.properties.set("brace-block-in-new-line-after", "true");
//interface.properties.set("brace-block-in-space-before", "true");
//interface.properties.set("brace-block-in-space-after", "true");
interface.properties.set("brace-block-in-indent-before", "true");
//interface.properties.set("brace-block-in-indent-after", "true");
// out:
interface.properties.set("brace-block-out-new-line-before", "true");
//interface.properties.set("brace-block-out-new-line-after", "true");
//interface.properties.set("brace-block-out-space-before", "true");
//interface.properties.set("brace-block-out-space-after", "true");
interface.properties.set("brace-block-out-unindent-after", "true");
//interface.properties.set("brace-block-out-unindent-before", "true");
// single:
//interface.properties.set("brace-block-single", "true");
etk::String outRef = "action_A;\n\t{action_B;\n\t}action_D;";
etk::String output = interface.process(sourceBrace1Action);
EXPECT_EQ(output, outRef);
}
TEST(testBlock, brace_101010) {
estyle::Generator interface;
// in:
interface.properties.set("brace-block-in-new-line-before", "true");
//interface.properties.set("brace-block-in-new-line-after", "true");
interface.properties.set("brace-block-in-space-before", "true");
//interface.properties.set("brace-block-in-space-after", "true");
interface.properties.set("brace-block-in-indent-before", "true");
//interface.properties.set("brace-block-in-indent-after", "true");
// out:
interface.properties.set("brace-block-out-new-line-before", "true");
//interface.properties.set("brace-block-out-new-line-after", "true");
interface.properties.set("brace-block-out-space-before", "true");
//interface.properties.set("brace-block-out-space-after", "true");
interface.properties.set("brace-block-out-unindent-after", "true");
//interface.properties.set("brace-block-out-unindent-before", "true");
// single:
//interface.properties.set("brace-block-single", "true");
etk::String outRef = "action_A;\n\t{action_B;\n\t}action_D;";
etk::String output = interface.process(sourceBrace1Action);
EXPECT_EQ(output, outRef);
}
TEST(testBlock, brace_101110) {
estyle::Generator interface;
// in:
interface.properties.set("brace-block-in-new-line-before", "true");
//interface.properties.set("brace-block-in-new-line-after", "true");
interface.properties.set("brace-block-in-space-before", "true");
interface.properties.set("brace-block-in-space-after", "true");
interface.properties.set("brace-block-in-indent-before", "true");
//interface.properties.set("brace-block-in-indent-after", "true");
// out:
interface.properties.set("brace-block-out-new-line-before", "true");
//interface.properties.set("brace-block-out-new-line-after", "true");
interface.properties.set("brace-block-out-space-before", "true");
interface.properties.set("brace-block-out-space-after", "true");
interface.properties.set("brace-block-out-unindent-after", "true");
//interface.properties.set("brace-block-out-unindent-before", "true");
// single:
//interface.properties.set("brace-block-single", "true");
etk::String outRef = "action_A;\n\t{ action_B;\n\t} action_D;";
etk::String output = interface.process(sourceBrace1Action);
EXPECT_EQ(output, outRef);
}
TEST(testBlock, brace_110010) {
estyle::Generator interface;
// in:
interface.properties.set("brace-block-in-new-line-before", "true");
interface.properties.set("brace-block-in-new-line-after", "true");
//interface.properties.set("brace-block-in-space-before", "true");
//interface.properties.set("brace-block-in-space-after", "true");
interface.properties.set("brace-block-in-indent-before", "true");
//interface.properties.set("brace-block-in-indent-after", "true");
// out:
interface.properties.set("brace-block-out-new-line-before", "true");
interface.properties.set("brace-block-out-new-line-after", "true");
//interface.properties.set("brace-block-out-space-before", "true");
//interface.properties.set("brace-block-out-space-after", "true");
interface.properties.set("brace-block-out-unindent-after", "true");
//interface.properties.set("brace-block-out-unindent-before", "true");
// single:
//interface.properties.set("brace-block-single", "true");
etk::String outRef = "action_A;\n\t{\n\taction_B;\n\t}\naction_D;";
etk::String output = interface.process(sourceBrace1Action);
EXPECT_EQ(output, outRef);
}
TEST(testBlock, brace_110110) {
estyle::Generator interface;
// in:
interface.properties.set("brace-block-in-new-line-before", "true");
interface.properties.set("brace-block-in-new-line-after", "true");
//interface.properties.set("brace-block-in-space-before", "true");
interface.properties.set("brace-block-in-space-after", "true");
interface.properties.set("brace-block-in-indent-before", "true");
//interface.properties.set("brace-block-in-indent-after", "true");
// out:
interface.properties.set("brace-block-out-new-line-before", "true");
interface.properties.set("brace-block-out-new-line-after", "true");
//interface.properties.set("brace-block-out-space-before", "true");
interface.properties.set("brace-block-out-space-after", "true");
interface.properties.set("brace-block-out-unindent-after", "true");
//interface.properties.set("brace-block-out-unindent-before", "true");
// single:
//interface.properties.set("brace-block-single", "true");
etk::String outRef = "action_A;\n\t{\n\taction_B;\n\t}\naction_D;";
etk::String output = interface.process(sourceBrace1Action);
EXPECT_EQ(output, outRef);
}
TEST(testBlock, brace_111010) {
estyle::Generator interface;
// in:
interface.properties.set("brace-block-in-new-line-before", "true");
interface.properties.set("brace-block-in-new-line-after", "true");
interface.properties.set("brace-block-in-space-before", "true");
//interface.properties.set("brace-block-in-space-after", "true");
interface.properties.set("brace-block-in-indent-before", "true");
//interface.properties.set("brace-block-in-indent-after", "true");
// out:
interface.properties.set("brace-block-out-new-line-before", "true");
interface.properties.set("brace-block-out-new-line-after", "true");
interface.properties.set("brace-block-out-space-before", "true");
//interface.properties.set("brace-block-out-space-after", "true");
interface.properties.set("brace-block-out-unindent-after", "true");
//interface.properties.set("brace-block-out-unindent-before", "true");
// single:
//interface.properties.set("brace-block-single", "true");
etk::String outRef = "action_A;\n\t{\n\taction_B;\n\t}\naction_D;";
etk::String output = interface.process(sourceBrace1Action);
EXPECT_EQ(output, outRef);
}
TEST(testBlock, brace_111110) {
estyle::Generator interface;
// in:
interface.properties.set("brace-block-in-new-line-before", "true");
interface.properties.set("brace-block-in-new-line-after", "true");
interface.properties.set("brace-block-in-space-before", "true");
interface.properties.set("brace-block-in-space-after", "true");
interface.properties.set("brace-block-in-indent-before", "true");
//interface.properties.set("brace-block-in-indent-after", "true");
// out:
interface.properties.set("brace-block-out-new-line-before", "true");
interface.properties.set("brace-block-out-new-line-after", "true");
interface.properties.set("brace-block-out-space-before", "true");
interface.properties.set("brace-block-out-space-after", "true");
interface.properties.set("brace-block-out-unindent-after", "true");
//interface.properties.set("brace-block-out-unindent-before", "true");
// single:
//interface.properties.set("brace-block-single", "true");
etk::String outRef = "action_A;\n\t{\n\taction_B;\n\t}\naction_D;";
etk::String output = interface.process(sourceBrace1Action);
EXPECT_EQ(output, outRef);
}
TEST(testBlock, brace_100110) {
estyle::Generator interface;
// in:
interface.properties.set("brace-block-in-new-line-before", "true");
//interface.properties.set("brace-block-in-new-line-after", "true");
//interface.properties.set("brace-block-in-space-before", "true");
interface.properties.set("brace-block-in-space-after", "true");
interface.properties.set("brace-block-in-indent-before", "true");
//interface.properties.set("brace-block-in-indent-after", "true");
// out:
interface.properties.set("brace-block-out-new-line-before", "true");
//interface.properties.set("brace-block-out-new-line-after", "true");
//interface.properties.set("brace-block-out-space-before", "true");
interface.properties.set("brace-block-out-space-after", "true");
interface.properties.set("brace-block-out-unindent-after", "true");
//interface.properties.set("brace-block-out-unindent-before", "true");
// single:
//interface.properties.set("brace-block-single", "true");
etk::String outRef = "action_A;\n\t{ action_B;\n\t} action_D;";
etk::String output = interface.process(sourceBrace1Action);
EXPECT_EQ(output, outRef);
}
TEST(testBlock, brace_010010) {
estyle::Generator interface;
// in:
//interface.properties.set("brace-block-in-new-line-before", "true");
interface.properties.set("brace-block-in-new-line-after", "true");
//interface.properties.set("brace-block-in-space-before", "true");
//interface.properties.set("brace-block-in-space-after", "true");
interface.properties.set("brace-block-in-indent-before", "true");
//interface.properties.set("brace-block-in-indent-after", "true");
// out:
//interface.properties.set("brace-block-out-new-line-before", "true");
interface.properties.set("brace-block-out-new-line-after", "true");
//interface.properties.set("brace-block-out-space-before", "true");
//interface.properties.set("brace-block-out-space-after", "true");
interface.properties.set("brace-block-out-unindent-after", "true");
//interface.properties.set("brace-block-out-unindent-before", "true");
// single:
//interface.properties.set("brace-block-single", "true");
etk::String outRef = "action_A;{\n\taction_B;}\naction_D;";
etk::String output = interface.process(sourceBrace1Action);
EXPECT_EQ(output, outRef);
}
TEST(testBlock, brace_010110) {
estyle::Generator interface;
// in:
//interface.properties.set("brace-block-in-new-line-before", "true");
interface.properties.set("brace-block-in-new-line-after", "true");
//interface.properties.set("brace-block-in-space-before", "true");
interface.properties.set("brace-block-in-space-after", "true");
interface.properties.set("brace-block-in-indent-before", "true");
//interface.properties.set("brace-block-in-indent-after", "true");
// out:
//interface.properties.set("brace-block-out-new-line-before", "true");
interface.properties.set("brace-block-out-new-line-after", "true");
//interface.properties.set("brace-block-out-space-before", "true");
interface.properties.set("brace-block-out-space-after", "true");
interface.properties.set("brace-block-out-unindent-after", "true");
//interface.properties.set("brace-block-out-unindent-before", "true");
// single:
//interface.properties.set("brace-block-single", "true");
etk::String outRef = "action_A;{\n\taction_B;}\naction_D;";
etk::String output = interface.process(sourceBrace1Action);
EXPECT_EQ(output, outRef);
}
TEST(testBlock, brace_011010) {
estyle::Generator interface;
// in:
//interface.properties.set("brace-block-in-new-line-before", "true");
interface.properties.set("brace-block-in-new-line-after", "true");
interface.properties.set("brace-block-in-space-before", "true");
//interface.properties.set("brace-block-in-space-after", "true");
interface.properties.set("brace-block-in-indent-before", "true");
//interface.properties.set("brace-block-in-indent-after", "true");
// out:
//interface.properties.set("brace-block-out-new-line-before", "true");
interface.properties.set("brace-block-out-new-line-after", "true");
interface.properties.set("brace-block-out-space-before", "true");
//interface.properties.set("brace-block-out-space-after", "true");
interface.properties.set("brace-block-out-unindent-after", "true");
//interface.properties.set("brace-block-out-unindent-before", "true");
// single:
//interface.properties.set("brace-block-single", "true");
etk::String outRef = "action_A; {\n\taction_B; }\naction_D;";
etk::String output = interface.process(sourceBrace1Action);
EXPECT_EQ(output, outRef);
}
TEST(testBlock, brace_001010) {
estyle::Generator interface;
// in:
//interface.properties.set("brace-block-in-new-line-before", "true");
//interface.properties.set("brace-block-in-new-line-after", "true");
interface.properties.set("brace-block-in-space-before", "true");
//interface.properties.set("brace-block-in-space-after", "true");
interface.properties.set("brace-block-in-indent-before", "true");
//interface.properties.set("brace-block-in-indent-after", "true");
// out:
//interface.properties.set("brace-block-out-new-line-before", "true");
//interface.properties.set("brace-block-out-new-line-after", "true");
interface.properties.set("brace-block-out-space-before", "true");
//interface.properties.set("brace-block-out-space-after", "true");
interface.properties.set("brace-block-out-unindent-after", "true");
//interface.properties.set("brace-block-out-unindent-before", "true");
// single:
//interface.properties.set("brace-block-single", "true");
etk::String outRef = "action_A; {action_B; }action_D;";
etk::String output = interface.process(sourceBrace1Action);
EXPECT_EQ(output, outRef);
}
TEST(testBlock, brace_001110) {
estyle::Generator interface;
// in:
//interface.properties.set("brace-block-in-new-line-before", "true");
//interface.properties.set("brace-block-in-new-line-after", "true");
interface.properties.set("brace-block-in-space-before", "true");
interface.properties.set("brace-block-in-space-after", "true");
interface.properties.set("brace-block-in-indent-before", "true");
//interface.properties.set("brace-block-in-indent-after", "true");
// out:
//interface.properties.set("brace-block-out-new-line-before", "true");
//interface.properties.set("brace-block-out-new-line-after", "true");
interface.properties.set("brace-block-out-space-before", "true");
interface.properties.set("brace-block-out-space-after", "true");
interface.properties.set("brace-block-out-unindent-after", "true");
//interface.properties.set("brace-block-out-unindent-before", "true");
// single:
//interface.properties.set("brace-block-single", "true");
etk::String outRef = "action_A; { action_B; } action_D;";
etk::String output = interface.process(sourceBrace1Action);
EXPECT_EQ(output, outRef);
}
TEST(testBlock, brace_011110) {
estyle::Generator interface;
// in:
//interface.properties.set("brace-block-in-new-line-before", "true");
interface.properties.set("brace-block-in-new-line-after", "true");
interface.properties.set("brace-block-in-space-before", "true");
interface.properties.set("brace-block-in-space-after", "true");
interface.properties.set("brace-block-in-indent-before", "true");
//interface.properties.set("brace-block-in-indent-after", "true");
// out:
//interface.properties.set("brace-block-out-new-line-before", "true");
interface.properties.set("brace-block-out-new-line-after", "true");
interface.properties.set("brace-block-out-space-before", "true");
interface.properties.set("brace-block-out-space-after", "true");
interface.properties.set("brace-block-out-unindent-after", "true");
//interface.properties.set("brace-block-out-unindent-before", "true");
// single:
//interface.properties.set("brace-block-single", "true");
etk::String outRef = "action_A; {\n\taction_B; }\naction_D;";
etk::String output = interface.process(sourceBrace1Action);
EXPECT_EQ(output, outRef);
}
TEST(testBlock, brace_000110) {
estyle::Generator interface;
// in:
//interface.properties.set("brace-block-in-new-line-before", "true");
//interface.properties.set("brace-block-in-new-line-after", "true");
//interface.properties.set("brace-block-in-space-before", "true");
interface.properties.set("brace-block-in-space-after", "true");
interface.properties.set("brace-block-in-indent-before", "true");
//interface.properties.set("brace-block-in-indent-after", "true");
// out:
//interface.properties.set("brace-block-out-new-line-before", "true");
//interface.properties.set("brace-block-out-new-line-after", "true");
//interface.properties.set("brace-block-out-space-before", "true");
interface.properties.set("brace-block-out-space-after", "true");
interface.properties.set("brace-block-out-unindent-after", "true");
//interface.properties.set("brace-block-out-unindent-before", "true");
// single:
//interface.properties.set("brace-block-single", "true");
etk::String outRef = "action_A;{ action_B;} action_D;";
etk::String output = interface.process(sourceBrace1Action);
EXPECT_EQ(output, outRef);
}
/////////////////////////////////////////////////////////////////////////////////////////
TEST(testBlock, brace_100011) {
estyle::Generator interface;
// in:
interface.properties.set("brace-block-in-new-line-before", "true");
//interface.properties.set("brace-block-in-new-line-after", "true");
//interface.properties.set("brace-block-in-space-before", "true");
//interface.properties.set("brace-block-in-space-after", "true");
interface.properties.set("brace-block-in-indent-before", "true");
interface.properties.set("brace-block-in-indent-after", "true");
// out:
interface.properties.set("brace-block-out-new-line-before", "true");
//interface.properties.set("brace-block-out-new-line-after", "true");
//interface.properties.set("brace-block-out-space-before", "true");
//interface.properties.set("brace-block-out-space-after", "true");
interface.properties.set("brace-block-out-unindent-after", "true");
interface.properties.set("brace-block-out-unindent-before", "true");
// single:
//interface.properties.set("brace-block-single", "true");
etk::String outRef = "action_A;\n\t{action_B;\n\t}action_D;";
etk::String output = interface.process(sourceBrace1Action);
EXPECT_EQ(output, outRef);
}
TEST(testBlock, brace_101011) {
estyle::Generator interface;
// in:
interface.properties.set("brace-block-in-new-line-before", "true");
//interface.properties.set("brace-block-in-new-line-after", "true");
interface.properties.set("brace-block-in-space-before", "true");
//interface.properties.set("brace-block-in-space-after", "true");
interface.properties.set("brace-block-in-indent-before", "true");
interface.properties.set("brace-block-in-indent-after", "true");
// out:
interface.properties.set("brace-block-out-new-line-before", "true");
//interface.properties.set("brace-block-out-new-line-after", "true");
interface.properties.set("brace-block-out-space-before", "true");
//interface.properties.set("brace-block-out-space-after", "true");
interface.properties.set("brace-block-out-unindent-after", "true");
interface.properties.set("brace-block-out-unindent-before", "true");
// single:
//interface.properties.set("brace-block-single", "true");
etk::String outRef = "action_A;\n\t{action_B;\n\t}action_D;";
etk::String output = interface.process(sourceBrace1Action);
EXPECT_EQ(output, outRef);
}
TEST(testBlock, brace_101111) {
estyle::Generator interface;
// in:
interface.properties.set("brace-block-in-new-line-before", "true");
//interface.properties.set("brace-block-in-new-line-after", "true");
interface.properties.set("brace-block-in-space-before", "true");
interface.properties.set("brace-block-in-space-after", "true");
interface.properties.set("brace-block-in-indent-before", "true");
interface.properties.set("brace-block-in-indent-after", "true");
// out:
interface.properties.set("brace-block-out-new-line-before", "true");
//interface.properties.set("brace-block-out-new-line-after", "true");
interface.properties.set("brace-block-out-space-before", "true");
interface.properties.set("brace-block-out-space-after", "true");
interface.properties.set("brace-block-out-unindent-after", "true");
interface.properties.set("brace-block-out-unindent-before", "true");
// single:
//interface.properties.set("brace-block-single", "true");
etk::String outRef = "action_A;\n\t{ action_B;\n\t} action_D;";
etk::String output = interface.process(sourceBrace1Action);
EXPECT_EQ(output, outRef);
}
TEST(testBlock, brace_110011) {
estyle::Generator interface;
// in:
interface.properties.set("brace-block-in-new-line-before", "true");
interface.properties.set("brace-block-in-new-line-after", "true");
//interface.properties.set("brace-block-in-space-before", "true");
//interface.properties.set("brace-block-in-space-after", "true");
interface.properties.set("brace-block-in-indent-before", "true");
interface.properties.set("brace-block-in-indent-after", "true");
// out:
interface.properties.set("brace-block-out-new-line-before", "true");
interface.properties.set("brace-block-out-new-line-after", "true");
//interface.properties.set("brace-block-out-space-before", "true");
//interface.properties.set("brace-block-out-space-after", "true");
interface.properties.set("brace-block-out-unindent-after", "true");
interface.properties.set("brace-block-out-unindent-before", "true");
// single:
//interface.properties.set("brace-block-single", "true");
etk::String outRef = "action_A;\n\t{\n\t\taction_B;\n\t}\naction_D;";
etk::String output = interface.process(sourceBrace1Action);
EXPECT_EQ(output, outRef);
}
TEST(testBlock, brace_110111) {
estyle::Generator interface;
// in:
interface.properties.set("brace-block-in-new-line-before", "true");
interface.properties.set("brace-block-in-new-line-after", "true");
//interface.properties.set("brace-block-in-space-before", "true");
interface.properties.set("brace-block-in-space-after", "true");
interface.properties.set("brace-block-in-indent-before", "true");
interface.properties.set("brace-block-in-indent-after", "true");
// out:
interface.properties.set("brace-block-out-new-line-before", "true");
interface.properties.set("brace-block-out-new-line-after", "true");
//interface.properties.set("brace-block-out-space-before", "true");
interface.properties.set("brace-block-out-space-after", "true");
interface.properties.set("brace-block-out-unindent-after", "true");
interface.properties.set("brace-block-out-unindent-before", "true");
// single:
//interface.properties.set("brace-block-single", "true");
etk::String outRef = "action_A;\n\t{\n\t\taction_B;\n\t}\naction_D;";
etk::String output = interface.process(sourceBrace1Action);
EXPECT_EQ(output, outRef);
}
TEST(testBlock, brace_111011) {
estyle::Generator interface;
// in:
interface.properties.set("brace-block-in-new-line-before", "true");
interface.properties.set("brace-block-in-new-line-after", "true");
interface.properties.set("brace-block-in-space-before", "true");
//interface.properties.set("brace-block-in-space-after", "true");
interface.properties.set("brace-block-in-indent-before", "true");
interface.properties.set("brace-block-in-indent-after", "true");
// out:
interface.properties.set("brace-block-out-new-line-before", "true");
interface.properties.set("brace-block-out-new-line-after", "true");
interface.properties.set("brace-block-out-space-before", "true");
//interface.properties.set("brace-block-out-space-after", "true");
interface.properties.set("brace-block-out-unindent-after", "true");
interface.properties.set("brace-block-out-unindent-before", "true");
// single:
//interface.properties.set("brace-block-single", "true");
etk::String outRef = "action_A;\n\t{\n\t\taction_B;\n\t}\naction_D;";
etk::String output = interface.process(sourceBrace1Action);
EXPECT_EQ(output, outRef);
}
TEST(testBlock, brace_111111) {
estyle::Generator interface;
// in:
interface.properties.set("brace-block-in-new-line-before", "true");
interface.properties.set("brace-block-in-new-line-after", "true");
interface.properties.set("brace-block-in-space-before", "true");
interface.properties.set("brace-block-in-space-after", "true");
interface.properties.set("brace-block-in-indent-before", "true");
interface.properties.set("brace-block-in-indent-after", "true");
// out:
interface.properties.set("brace-block-out-new-line-before", "true");
interface.properties.set("brace-block-out-new-line-after", "true");
interface.properties.set("brace-block-out-space-before", "true");
interface.properties.set("brace-block-out-space-after", "true");
interface.properties.set("brace-block-out-unindent-after", "true");
interface.properties.set("brace-block-out-unindent-before", "true");
// single:
//interface.properties.set("brace-block-single", "true");
etk::String outRef = "action_A;\n\t{\n\t\taction_B;\n\t}\naction_D;";
etk::String output = interface.process(sourceBrace1Action);
EXPECT_EQ(output, outRef);
}
TEST(testBlock, brace_100111) {
estyle::Generator interface;
// in:
interface.properties.set("brace-block-in-new-line-before", "true");
//interface.properties.set("brace-block-in-new-line-after", "true");
//interface.properties.set("brace-block-in-space-before", "true");
interface.properties.set("brace-block-in-space-after", "true");
interface.properties.set("brace-block-in-indent-before", "true");
interface.properties.set("brace-block-in-indent-after", "true");
// out:
interface.properties.set("brace-block-out-new-line-before", "true");
//interface.properties.set("brace-block-out-new-line-after", "true");
//interface.properties.set("brace-block-out-space-before", "true");
interface.properties.set("brace-block-out-space-after", "true");
interface.properties.set("brace-block-out-unindent-after", "true");
interface.properties.set("brace-block-out-unindent-before", "true");
// single:
//interface.properties.set("brace-block-single", "true");
etk::String outRef = "action_A;\n\t{ action_B;\n\t} action_D;";
etk::String output = interface.process(sourceBrace1Action);
EXPECT_EQ(output, outRef);
}
TEST(testBlock, brace_010011) {
estyle::Generator interface;
// in:
//interface.properties.set("brace-block-in-new-line-before", "true");
interface.properties.set("brace-block-in-new-line-after", "true");
//interface.properties.set("brace-block-in-space-before", "true");
//interface.properties.set("brace-block-in-space-after", "true");
interface.properties.set("brace-block-in-indent-before", "true");
interface.properties.set("brace-block-in-indent-after", "true");
// out:
//interface.properties.set("brace-block-out-new-line-before", "true");
interface.properties.set("brace-block-out-new-line-after", "true");
//interface.properties.set("brace-block-out-space-before", "true");
//interface.properties.set("brace-block-out-space-after", "true");
interface.properties.set("brace-block-out-unindent-after", "true");
interface.properties.set("brace-block-out-unindent-before", "true");
// single:
//interface.properties.set("brace-block-single", "true");
etk::String outRef = "action_A;{\n\t\taction_B;}\naction_D;";
etk::String output = interface.process(sourceBrace1Action);
EXPECT_EQ(output, outRef);
}
TEST(testBlock, brace_010111) {
estyle::Generator interface;
// in:
//interface.properties.set("brace-block-in-new-line-before", "true");
interface.properties.set("brace-block-in-new-line-after", "true");
//interface.properties.set("brace-block-in-space-before", "true");
interface.properties.set("brace-block-in-space-after", "true");
interface.properties.set("brace-block-in-indent-before", "true");
interface.properties.set("brace-block-in-indent-after", "true");
// out:
//interface.properties.set("brace-block-out-new-line-before", "true");
interface.properties.set("brace-block-out-new-line-after", "true");
//interface.properties.set("brace-block-out-space-before", "true");
interface.properties.set("brace-block-out-space-after", "true");
interface.properties.set("brace-block-out-unindent-after", "true");
interface.properties.set("brace-block-out-unindent-before", "true");
// single:
//interface.properties.set("brace-block-single", "true");
etk::String outRef = "action_A;{\n\t\taction_B;}\naction_D;";
etk::String output = interface.process(sourceBrace1Action);
EXPECT_EQ(output, outRef);
}
TEST(testBlock, brace_011011) {
estyle::Generator interface;
// in:
//interface.properties.set("brace-block-in-new-line-before", "true");
interface.properties.set("brace-block-in-new-line-after", "true");
interface.properties.set("brace-block-in-space-before", "true");
//interface.properties.set("brace-block-in-space-after", "true");
interface.properties.set("brace-block-in-indent-before", "true");
interface.properties.set("brace-block-in-indent-after", "true");
// out:
//interface.properties.set("brace-block-out-new-line-before", "true");
interface.properties.set("brace-block-out-new-line-after", "true");
interface.properties.set("brace-block-out-space-before", "true");
//interface.properties.set("brace-block-out-space-after", "true");
interface.properties.set("brace-block-out-unindent-after", "true");
interface.properties.set("brace-block-out-unindent-before", "true");
// single:
//interface.properties.set("brace-block-single", "true");
etk::String outRef = "action_A; {\n\t\taction_B; }\naction_D;";
etk::String output = interface.process(sourceBrace1Action);
EXPECT_EQ(output, outRef);
}
TEST(testBlock, brace_001011) {
estyle::Generator interface;
// in:
//interface.properties.set("brace-block-in-new-line-before", "true");
//interface.properties.set("brace-block-in-new-line-after", "true");
interface.properties.set("brace-block-in-space-before", "true");
//interface.properties.set("brace-block-in-space-after", "true");
interface.properties.set("brace-block-in-indent-before", "true");
interface.properties.set("brace-block-in-indent-after", "true");
// out:
//interface.properties.set("brace-block-out-new-line-before", "true");
//interface.properties.set("brace-block-out-new-line-after", "true");
interface.properties.set("brace-block-out-space-before", "true");
//interface.properties.set("brace-block-out-space-after", "true");
interface.properties.set("brace-block-out-unindent-after", "true");
interface.properties.set("brace-block-out-unindent-before", "true");
// single:
//interface.properties.set("brace-block-single", "true");
etk::String outRef = "action_A; {action_B; }action_D;";
etk::String output = interface.process(sourceBrace1Action);
EXPECT_EQ(output, outRef);
}
TEST(testBlock, brace_001111) {
estyle::Generator interface;
// in:
//interface.properties.set("brace-block-in-new-line-before", "true");
//interface.properties.set("brace-block-in-new-line-after", "true");
interface.properties.set("brace-block-in-space-before", "true");
interface.properties.set("brace-block-in-space-after", "true");
interface.properties.set("brace-block-in-indent-before", "true");
interface.properties.set("brace-block-in-indent-after", "true");
// out:
//interface.properties.set("brace-block-out-new-line-before", "true");
//interface.properties.set("brace-block-out-new-line-after", "true");
interface.properties.set("brace-block-out-space-before", "true");
interface.properties.set("brace-block-out-space-after", "true");
interface.properties.set("brace-block-out-unindent-after", "true");
interface.properties.set("brace-block-out-unindent-before", "true");
// single:
//interface.properties.set("brace-block-single", "true");
etk::String outRef = "action_A; { action_B; } action_D;";
etk::String output = interface.process(sourceBrace1Action);
EXPECT_EQ(output, outRef);
}
TEST(testBlock, brace_011111) {
estyle::Generator interface;
// in:
//interface.properties.set("brace-block-in-new-line-before", "true");
interface.properties.set("brace-block-in-new-line-after", "true");
interface.properties.set("brace-block-in-space-before", "true");
interface.properties.set("brace-block-in-space-after", "true");
interface.properties.set("brace-block-in-indent-before", "true");
interface.properties.set("brace-block-in-indent-after", "true");
// out:
//interface.properties.set("brace-block-out-new-line-before", "true");
interface.properties.set("brace-block-out-new-line-after", "true");
interface.properties.set("brace-block-out-space-before", "true");
interface.properties.set("brace-block-out-space-after", "true");
interface.properties.set("brace-block-out-unindent-after", "true");
interface.properties.set("brace-block-out-unindent-before", "true");
// single:
//interface.properties.set("brace-block-single", "true");
etk::String outRef = "action_A; {\n\t\taction_B; }\naction_D;";
etk::String output = interface.process(sourceBrace1Action);
EXPECT_EQ(output, outRef);
}
TEST(testBlock, brace_000111) {
estyle::Generator interface;
// in:
//interface.properties.set("brace-block-in-new-line-before", "true");
//interface.properties.set("brace-block-in-new-line-after", "true");
//interface.properties.set("brace-block-in-space-before", "true");
interface.properties.set("brace-block-in-space-after", "true");
interface.properties.set("brace-block-in-indent-before", "true");
interface.properties.set("brace-block-in-indent-after", "true");
// out:
//interface.properties.set("brace-block-out-new-line-before", "true");
//interface.properties.set("brace-block-out-new-line-after", "true");
//interface.properties.set("brace-block-out-space-before", "true");
interface.properties.set("brace-block-out-space-after", "true");
interface.properties.set("brace-block-out-unindent-after", "true");
interface.properties.set("brace-block-out-unindent-before", "true");
// single:
//interface.properties.set("brace-block-single", "true");
etk::String outRef = "action_A;{ action_B;} action_D;";
etk::String output = interface.process(sourceBrace1Action);
EXPECT_EQ(output, outRef);
}
/////////////////////////////////////////////////////////////////////////////////////////
TEST(testBlock, brace_empty_000) {
estyle::Generator interface;
// in out for specific empty change:
interface.properties.set("brace-block-in-new-line-before", "true");
interface.properties.set("brace-block-in-new-line-after", "true");
interface.properties.set("brace-block-in-space-before", "true");
interface.properties.set("brace-block-in-space-after", "true");
interface.properties.set("brace-block-in-indent-before", "true");
interface.properties.set("brace-block-in-indent-after", "true");
// out:
interface.properties.set("brace-block-out-new-line-before", "true");
interface.properties.set("brace-block-out-new-line-after", "true");
interface.properties.set("brace-block-out-space-before", "true");
interface.properties.set("brace-block-out-space-after", "true");
interface.properties.set("brace-block-out-unindent-after", "true");
interface.properties.set("brace-block-out-unindent-before", "true");
// empty
//interface.properties.set("brace-block-one-line-size-max", "0");
//interface.properties.set("brace-empty-space", "true");
//interface.properties.set("brace-empty-indent", "true");
etk::String outRef = "action_A;\n\t{\n\t}\naction_D;";
etk::String output = interface.process(sourceBrace0Action);
EXPECT_EQ(output, outRef);
}
TEST(testBlock, brace_empty_100) {
estyle::Generator interface;
// in out for specific empty change:
interface.properties.set("brace-block-in-new-line-before", "true");
interface.properties.set("brace-block-in-new-line-after", "true");
interface.properties.set("brace-block-in-space-before", "true");
interface.properties.set("brace-block-in-space-after", "true");
interface.properties.set("brace-block-in-indent-before", "true");
interface.properties.set("brace-block-in-indent-after", "true");
// out:
interface.properties.set("brace-block-out-new-line-before", "true");
interface.properties.set("brace-block-out-new-line-after", "true");
interface.properties.set("brace-block-out-space-before", "true");
interface.properties.set("brace-block-out-space-after", "true");
interface.properties.set("brace-block-out-unindent-after", "true");
interface.properties.set("brace-block-out-unindent-before", "true");
// empty
interface.properties.set("brace-block-one-line-size-max", "0");
//interface.properties.set("brace-block-empty-space", "true");
//interface.properties.set("brace-block-empty-indent", "true");
etk::String outRef = "action_A; {}\naction_D;";
etk::String output = interface.process(sourceBrace0Action);
EXPECT_EQ(output, outRef);
}
TEST(testBlock, brace_empty_110) {
estyle::Generator interface;
// in out for specific empty change:
interface.properties.set("brace-block-in-new-line-before", "true");
interface.properties.set("brace-block-in-new-line-after", "true");
interface.properties.set("brace-block-in-space-before", "true");
interface.properties.set("brace-block-in-space-after", "true");
interface.properties.set("brace-block-in-indent-before", "true");
interface.properties.set("brace-block-in-indent-after", "true");
// out:
interface.properties.set("brace-block-out-new-line-before", "true");
interface.properties.set("brace-block-out-new-line-after", "true");
interface.properties.set("brace-block-out-space-before", "true");
interface.properties.set("brace-block-out-space-after", "true");
interface.properties.set("brace-block-out-unindent-after", "true");
interface.properties.set("brace-block-out-unindent-before", "true");
// empty
interface.properties.set("brace-block-one-line-size-max", "0");
interface.properties.set("brace-block-empty-space", "true");
//interface.properties.set("brace-block-empty-indent", "true");
etk::String outRef = "action_A; { }\naction_D;";
etk::String output = interface.process(sourceBrace0Action);
EXPECT_EQ(output, outRef);
}
TEST(testBlock, brace_empty_111) {
estyle::Generator interface;
// in out for specific empty change:
interface.properties.set("brace-block-in-new-line-before", "true");
interface.properties.set("brace-block-in-new-line-after", "true");
interface.properties.set("brace-block-in-space-before", "true");
interface.properties.set("brace-block-in-space-after", "true");
interface.properties.set("brace-block-in-indent-before", "true");
interface.properties.set("brace-block-in-indent-after", "true");
// out:
interface.properties.set("brace-block-out-new-line-before", "true");
interface.properties.set("brace-block-out-new-line-after", "true");
interface.properties.set("brace-block-out-space-before", "true");
interface.properties.set("brace-block-out-space-after", "true");
interface.properties.set("brace-block-out-unindent-after", "true");
interface.properties.set("brace-block-out-unindent-before", "true");
// empty
interface.properties.set("brace-block-one-line-size-max", "0");
interface.properties.set("brace-block-empty-space", "true");
interface.properties.set("brace-block-empty-indent", "true");
etk::String outRef = "action_A; { }\naction_D;";
etk::String output = interface.process(sourceBrace0Action);
EXPECT_EQ(output, outRef);
}
TEST(testBlock, brace_empty_001) {
estyle::Generator interface;
// in out for specific empty change:
interface.properties.set("brace-block-in-new-line-before", "true");
interface.properties.set("brace-block-in-new-line-after", "true");
interface.properties.set("brace-block-in-space-before", "true");
interface.properties.set("brace-block-in-space-after", "true");
interface.properties.set("brace-block-in-indent-before", "true");
interface.properties.set("brace-block-in-indent-after", "true");
// out:
interface.properties.set("brace-block-out-new-line-before", "true");
interface.properties.set("brace-block-out-new-line-after", "true");
interface.properties.set("brace-block-out-space-before", "true");
interface.properties.set("brace-block-out-space-after", "true");
interface.properties.set("brace-block-out-unindent-after", "true");
interface.properties.set("brace-block-out-unindent-before", "true");
// empty
//interface.properties.set("brace-block-one-line-size-max", "0");
//interface.properties.set("brace-block-empty-space", "true");
interface.properties.set("brace-block-empty-indent", "true");
etk::String outRef = "action_A;\n\t{\n\t\t\n\t}\naction_D;";
etk::String output = interface.process(sourceBrace0Action);
EXPECT_EQ(output, outRef);
}