summaryrefslogtreecommitdiff
path: root/compiler/cpp/tests
diff options
context:
space:
mode:
authorJens Geyer <jensg@apache.org>2019-10-19 18:27:35 +0200
committerJens Geyer <jensg@apache.org>2019-10-20 16:21:29 +0200
commit3f3567a1143194712747fff9dd02b2162e2d14dd (patch)
tree36564d5680c36fca18a7d8c9aac296e1f70187ef /compiler/cpp/tests
parent7199741f440ef7de15e13755ea2371157c8cd298 (diff)
downloadthrift-3f3567a1143194712747fff9dd02b2162e2d14dd.tar.gz
THRIFT-4981 Remove deprecated netcore bindings from the code base
Client: netcore Patch: Jens Geyer This closes #1901
Diffstat (limited to 'compiler/cpp/tests')
-rw-r--r--compiler/cpp/tests/CMakeLists.txt2
-rw-r--r--compiler/cpp/tests/README.md4
-rw-r--r--compiler/cpp/tests/netcore/t_netcore_generator_functional_tests.cc58
-rw-r--r--compiler/cpp/tests/netcore/t_netcore_generator_functional_tests_helpers.cc48
-rw-r--r--compiler/cpp/tests/netcore/t_netcore_generator_functional_tests_helpers.h16
-rw-r--r--compiler/cpp/tests/netcore/t_netcore_generator_helpers_tests.cc24
-rw-r--r--compiler/cpp/tests/netcore/t_netcore_generator_initialization_tests.cc24
7 files changed, 88 insertions, 88 deletions
diff --git a/compiler/cpp/tests/CMakeLists.txt b/compiler/cpp/tests/CMakeLists.txt
index 91cc35dbf..7798c15f1 100644
--- a/compiler/cpp/tests/CMakeLists.txt
+++ b/compiler/cpp/tests/CMakeLists.txt
@@ -116,7 +116,7 @@ THRIFT_ADD_COMPILER(javame "Enable compiler for Java ME" OFF)
THRIFT_ADD_COMPILER(js "Enable compiler for JavaScript" OFF)
THRIFT_ADD_COMPILER(json "Enable compiler for JSON" OFF)
THRIFT_ADD_COMPILER(lua "Enable compiler for Lua" OFF)
-THRIFT_ADD_COMPILER(netcore "Enable compiler for .NET Core" ON)
+THRIFT_ADD_COMPILER(netstd "Enable compiler for .NET Standard" ON)
THRIFT_ADD_COMPILER(ocaml "Enable compiler for OCaml" OFF)
THRIFT_ADD_COMPILER(perl "Enable compiler for Perl" OFF)
THRIFT_ADD_COMPILER(php "Enable compiler for PHP" OFF)
diff --git a/compiler/cpp/tests/README.md b/compiler/cpp/tests/README.md
index 27be491cb..91c0625a3 100644
--- a/compiler/cpp/tests/README.md
+++ b/compiler/cpp/tests/README.md
@@ -16,7 +16,7 @@
## General information
-Added generic way to cover code by tests for many languages (you just need to make a correct header file for generator for your language - example in **netcore** implementation)
+Added generic way to cover code by tests for many languages (you just need to make a correct header file for generator for your language - example in **netstd** implementation)
At current moment these tests use free Catch library (https://github.com/catchorg/Catch2/tree/Catch1.x) for easy test creation and usage.
Decision to use it was because of simplicity, easy usage, one header file to use, stable community and growing interest (https://cpp.libhunt.com/project/googletest-google/vs/catch?rel=cmp-cmp)
@@ -29,7 +29,7 @@ Also, maybe, later it will be migrated to Catch2 (https://github.com/philsquared
- Set **On** to call of **THRIFT_ADD_COMPILER** for your language
``` cmake
-THRIFT_ADD_COMPILER(netcore "Enable compiler for .NET Core" ON)
+THRIFT_ADD_COMPILER(netstd "Enable compiler for .NET Standard" ON)
```
- Create folder with name specified in list of languages in **CMakeLists.txt**
diff --git a/compiler/cpp/tests/netcore/t_netcore_generator_functional_tests.cc b/compiler/cpp/tests/netcore/t_netcore_generator_functional_tests.cc
index 0b8c8378e..a2f0a502d 100644
--- a/compiler/cpp/tests/netcore/t_netcore_generator_functional_tests.cc
+++ b/compiler/cpp/tests/netcore/t_netcore_generator_functional_tests.cc
@@ -17,18 +17,18 @@
#include "../catch/catch.hpp"
#include <thrift/parse/t_program.h>
-#include <thrift/generate/t_netcore_generator.h>
-#include "t_netcore_generator_functional_tests_helpers.h"
+#include <thrift/generate/t_netstd_generator.h>
+#include "t_netstd_generator_functional_tests_helpers.h"
-TEST_CASE( "t_netcore_generator should generate valid enum", "[functional]" )
+TEST_CASE( "t_netstd_generator should generate valid enum", "[functional]" )
{
string path = "CassandraTest.thrift";
- string name = "netcore";
+ string name = "netstd";
map<string, string> parsed_options = { { "wcf", "wcf" } };
string option_string = "";
t_program* program = new t_program(path, name);
- t_netcore_generator* gen = new t_netcore_generator(program, parsed_options, option_string);
+ t_netstd_generator* gen = new t_netstd_generator(program, parsed_options, option_string);
std::pair<string, t_enum*> pair = TestDataGenerator::get_test_enum_data(program);
string expected_result = pair.first;
@@ -53,15 +53,15 @@ TEST_CASE( "t_netcore_generator should generate valid enum", "[functional]" )
delete program;
}
-TEST_CASE("t_netcore_generator should generate valid void", "[functional]")
+TEST_CASE("t_netstd_generator should generate valid void", "[functional]")
{
string path = "CassandraTest.thrift";
- string name = "netcore";
+ string name = "netstd";
map<string, string> parsed_options = { { "wcf", "wcf" } };
string option_string = "";
t_program* program = new t_program(path, name);
- t_netcore_generator* gen = new t_netcore_generator(program, parsed_options, option_string);
+ t_netstd_generator* gen = new t_netstd_generator(program, parsed_options, option_string);
std::pair<string, t_const*> pair = TestDataGenerator::get_test_void_const_data(gen);
string expected_result = pair.first;
@@ -86,15 +86,15 @@ TEST_CASE("t_netcore_generator should generate valid void", "[functional]")
delete program;
}
-TEST_CASE("t_netcore_generator should generate valid string with escaping keyword", "[functional]")
+TEST_CASE("t_netstd_generator should generate valid string with escaping keyword", "[functional]")
{
string path = "CassandraTest.thrift";
- string name = "netcore";
+ string name = "netstd";
map<string, string> parsed_options = { { "wcf", "wcf" } };
string option_string = "";
t_program* program = new t_program(path, name);
- t_netcore_generator* gen = new t_netcore_generator(program, parsed_options, option_string);
+ t_netstd_generator* gen = new t_netstd_generator(program, parsed_options, option_string);
gen->init_generator();
std::pair<string, t_const*> pair = TestDataGenerator::get_test_string_const_data(gen);
@@ -122,15 +122,15 @@ TEST_CASE("t_netcore_generator should generate valid string with escaping keywor
delete program;
}
-TEST_CASE("t_netcore_generator should generate valid bool with escaping keyword", "[functional]")
+TEST_CASE("t_netstd_generator should generate valid bool with escaping keyword", "[functional]")
{
string path = "CassandraTest.thrift";
- string name = "netcore";
+ string name = "netstd";
map<string, string> parsed_options = { { "wcf", "wcf" } };
string option_string = "";
t_program* program = new t_program(path, name);
- t_netcore_generator* gen = new t_netcore_generator(program, parsed_options, option_string);
+ t_netstd_generator* gen = new t_netstd_generator(program, parsed_options, option_string);
gen->init_generator();
std::pair<string, t_const*> pair = TestDataGenerator::get_test_bool_const_data(gen);
@@ -158,15 +158,15 @@ TEST_CASE("t_netcore_generator should generate valid bool with escaping keyword"
delete program;
}
-TEST_CASE("t_netcore_generator should generate valid sbyte (i8) with escaping keyword", "[functional]")
+TEST_CASE("t_netstd_generator should generate valid sbyte (i8) with escaping keyword", "[functional]")
{
string path = "CassandraTest.thrift";
- string name = "netcore";
+ string name = "netstd";
map<string, string> parsed_options = { { "wcf", "wcf" } };
string option_string = "";
t_program* program = new t_program(path, name);
- t_netcore_generator* gen = new t_netcore_generator(program, parsed_options, option_string);
+ t_netstd_generator* gen = new t_netstd_generator(program, parsed_options, option_string);
gen->init_generator();
std::pair<string, t_const*> pair = TestDataGenerator::get_test_i8_const_data(gen);
@@ -194,15 +194,15 @@ TEST_CASE("t_netcore_generator should generate valid sbyte (i8) with escaping ke
delete program;
}
-TEST_CASE("t_netcore_generator should generate valid short (i16) with escaping keyword", "[functional]")
+TEST_CASE("t_netstd_generator should generate valid short (i16) with escaping keyword", "[functional]")
{
string path = "CassandraTest.thrift";
- string name = "netcore";
+ string name = "netstd";
map<string, string> parsed_options = { { "wcf", "wcf" } };
string option_string = "";
t_program* program = new t_program(path, name);
- t_netcore_generator* gen = new t_netcore_generator(program, parsed_options, option_string);
+ t_netstd_generator* gen = new t_netstd_generator(program, parsed_options, option_string);
gen->init_generator();
std::pair<string, t_const*> pair = TestDataGenerator::get_test_i16_const_data(gen);
@@ -230,15 +230,15 @@ TEST_CASE("t_netcore_generator should generate valid short (i16) with escaping k
delete program;
}
-TEST_CASE("t_netcore_generator should generate valid integer (i32) with escaping keyword", "[functional]")
+TEST_CASE("t_netstd_generator should generate valid integer (i32) with escaping keyword", "[functional]")
{
string path = "CassandraTest.thrift";
- string name = "netcore";
+ string name = "netstd";
map<string, string> parsed_options = { { "wcf", "wcf" } };
string option_string = "";
t_program* program = new t_program(path, name);
- t_netcore_generator* gen = new t_netcore_generator(program, parsed_options, option_string);
+ t_netstd_generator* gen = new t_netstd_generator(program, parsed_options, option_string);
gen->init_generator();
std::pair<string, t_const*> pair = TestDataGenerator::get_test_i32_const_data(gen);
@@ -266,15 +266,15 @@ TEST_CASE("t_netcore_generator should generate valid integer (i32) with escaping
delete program;
}
-TEST_CASE("t_netcore_generator should generate valid long (i64) with escaping keyword", "[functional]")
+TEST_CASE("t_netstd_generator should generate valid long (i64) with escaping keyword", "[functional]")
{
string path = "CassandraTest.thrift";
- string name = "netcore";
+ string name = "netstd";
map<string, string> parsed_options = { { "wcf", "wcf" } };
string option_string = "";
t_program* program = new t_program(path, name);
- t_netcore_generator* gen = new t_netcore_generator(program, parsed_options, option_string);
+ t_netstd_generator* gen = new t_netstd_generator(program, parsed_options, option_string);
gen->init_generator();
std::pair<string, t_const*> pair = TestDataGenerator::get_test_i64_const_data(gen);
@@ -302,15 +302,15 @@ TEST_CASE("t_netcore_generator should generate valid long (i64) with escaping ke
delete program;
}
-TEST_CASE("t_netcore_generator should generate valid double with escaping keyword", "[functional]")
+TEST_CASE("t_netstd_generator should generate valid double with escaping keyword", "[functional]")
{
string path = "CassandraTest.thrift";
- string name = "netcore";
+ string name = "netstd";
map<string, string> parsed_options = { { "wcf", "wcf" } };
string option_string = "";
t_program* program = new t_program(path, name);
- t_netcore_generator* gen = new t_netcore_generator(program, parsed_options, option_string);
+ t_netstd_generator* gen = new t_netstd_generator(program, parsed_options, option_string);
gen->init_generator();
std::pair<string, t_const*> pair = TestDataGenerator::get_test_double_const_data(gen);
diff --git a/compiler/cpp/tests/netcore/t_netcore_generator_functional_tests_helpers.cc b/compiler/cpp/tests/netcore/t_netcore_generator_functional_tests_helpers.cc
index 92c170bb9..db4ce78ae 100644
--- a/compiler/cpp/tests/netcore/t_netcore_generator_functional_tests_helpers.cc
+++ b/compiler/cpp/tests/netcore/t_netcore_generator_functional_tests_helpers.cc
@@ -17,8 +17,8 @@
#include <thrift/parse/t_program.h>
#include "thrift/common.h"
-#include <thrift/generate/t_netcore_generator.h>
-#include "t_netcore_generator_functional_tests_helpers.h"
+#include <thrift/generate/t_netstd_generator.h>
+#include "t_netstd_generator_functional_tests_helpers.h"
const string TestDataGenerator::DEFAULT_FILE_HEADER = "/**" "\n"
" * Autogenerated by Thrift Compiler ()" "\n"
@@ -52,7 +52,7 @@ std::pair<string, t_enum*> TestDataGenerator::get_test_enum_data(t_program* prog
return std::pair<string, t_enum*>(expected_result, enum_);
}
-std::pair<string, t_const*> TestDataGenerator::get_test_void_const_data(t_netcore_generator* gen)
+std::pair<string, t_const*> TestDataGenerator::get_test_void_const_data(t_netstd_generator* gen)
{
string expected_result = DEFAULT_FILE_HEADER;
@@ -68,11 +68,11 @@ std::pair<string, t_const*> TestDataGenerator::get_test_void_const_data(t_netcor
return std::pair<string, t_const*>(expected_result, const_);
}
-std::pair<string, t_const*> TestDataGenerator::get_test_string_const_data(t_netcore_generator* gen)
+std::pair<string, t_const*> TestDataGenerator::get_test_string_const_data(t_netstd_generator* gen)
{
- string expected_result = DEFAULT_FILE_HEADER + "\n" +gen->netcore_type_usings() +
+ string expected_result = DEFAULT_FILE_HEADER + "\n" +gen->netstd_type_usings() +
"\n"
- "public static class netcoreConstants\n"
+ "public static class netstdConstants\n"
"{\n"
" /// <summary>\n"
" /// TestDoc\n"
@@ -92,11 +92,11 @@ std::pair<string, t_const*> TestDataGenerator::get_test_string_const_data(t_netc
return std::pair<string, t_const*>(expected_result, const_);
}
-std::pair<string, t_const*> TestDataGenerator::get_test_bool_const_data(t_netcore_generator* gen)
+std::pair<string, t_const*> TestDataGenerator::get_test_bool_const_data(t_netstd_generator* gen)
{
- string expected_result = DEFAULT_FILE_HEADER + "\n" +gen->netcore_type_usings() +
+ string expected_result = DEFAULT_FILE_HEADER + "\n" +gen->netstd_type_usings() +
"\n"
- "public static class netcoreConstants\n"
+ "public static class netstdConstants\n"
"{\n"
" /// <summary>\n"
" /// TestDoc\n"
@@ -116,11 +116,11 @@ std::pair<string, t_const*> TestDataGenerator::get_test_bool_const_data(t_netcor
return std::pair<string, t_const*>(expected_result, const_);
}
-std::pair<string, t_const*> TestDataGenerator::get_test_i8_const_data(t_netcore_generator* gen)
+std::pair<string, t_const*> TestDataGenerator::get_test_i8_const_data(t_netstd_generator* gen)
{
- string expected_result = DEFAULT_FILE_HEADER + "\n" +gen->netcore_type_usings() +
+ string expected_result = DEFAULT_FILE_HEADER + "\n" +gen->netstd_type_usings() +
"\n"
- "public static class netcoreConstants\n"
+ "public static class netstdConstants\n"
"{\n"
" /// <summary>\n"
" /// TestDoc\n"
@@ -140,11 +140,11 @@ std::pair<string, t_const*> TestDataGenerator::get_test_i8_const_data(t_netcore_
return std::pair<string, t_const*>(expected_result, const_);
}
-std::pair<string, t_const*> TestDataGenerator::get_test_i16_const_data(t_netcore_generator* gen)
+std::pair<string, t_const*> TestDataGenerator::get_test_i16_const_data(t_netstd_generator* gen)
{
- string expected_result = DEFAULT_FILE_HEADER + "\n" +gen->netcore_type_usings() +
+ string expected_result = DEFAULT_FILE_HEADER + "\n" +gen->netstd_type_usings() +
"\n"
- "public static class netcoreConstants\n"
+ "public static class netstdConstants\n"
"{\n"
" /// <summary>\n"
" /// TestDoc\n"
@@ -164,11 +164,11 @@ std::pair<string, t_const*> TestDataGenerator::get_test_i16_const_data(t_netcore
return std::pair<string, t_const*>(expected_result, const_);
}
-std::pair<string, t_const*> TestDataGenerator::get_test_i32_const_data(t_netcore_generator* gen)
+std::pair<string, t_const*> TestDataGenerator::get_test_i32_const_data(t_netstd_generator* gen)
{
- string expected_result = DEFAULT_FILE_HEADER + "\n" +gen->netcore_type_usings() +
+ string expected_result = DEFAULT_FILE_HEADER + "\n" +gen->netstd_type_usings() +
"\n"
- "public static class netcoreConstants\n"
+ "public static class netstdConstants\n"
"{\n"
" /// <summary>\n"
" /// TestDoc\n"
@@ -188,11 +188,11 @@ std::pair<string, t_const*> TestDataGenerator::get_test_i32_const_data(t_netcore
return std::pair<string, t_const*>(expected_result, const_);
}
-std::pair<string, t_const*> TestDataGenerator::get_test_i64_const_data(t_netcore_generator* gen)
+std::pair<string, t_const*> TestDataGenerator::get_test_i64_const_data(t_netstd_generator* gen)
{
- string expected_result = DEFAULT_FILE_HEADER + "\n" +gen->netcore_type_usings() +
+ string expected_result = DEFAULT_FILE_HEADER + "\n" +gen->netstd_type_usings() +
"\n"
- "public static class netcoreConstants\n"
+ "public static class netstdConstants\n"
"{\n"
" /// <summary>\n"
" /// TestDoc\n"
@@ -212,11 +212,11 @@ std::pair<string, t_const*> TestDataGenerator::get_test_i64_const_data(t_netcore
return std::pair<string, t_const*>(expected_result, const_);
}
-std::pair<string, t_const*> TestDataGenerator::get_test_double_const_data(t_netcore_generator* gen)
+std::pair<string, t_const*> TestDataGenerator::get_test_double_const_data(t_netstd_generator* gen)
{
- string expected_result = DEFAULT_FILE_HEADER + "\n" +gen->netcore_type_usings() +
+ string expected_result = DEFAULT_FILE_HEADER + "\n" +gen->netstd_type_usings() +
"\n"
- "public static class netcoreConstants\n"
+ "public static class netstdConstants\n"
"{\n"
" /// <summary>\n"
" /// TestDoc\n"
diff --git a/compiler/cpp/tests/netcore/t_netcore_generator_functional_tests_helpers.h b/compiler/cpp/tests/netcore/t_netcore_generator_functional_tests_helpers.h
index c6eaac22c..982919799 100644
--- a/compiler/cpp/tests/netcore/t_netcore_generator_functional_tests_helpers.h
+++ b/compiler/cpp/tests/netcore/t_netcore_generator_functional_tests_helpers.h
@@ -23,12 +23,12 @@ public:
static const string DEFAULT_FILE_HEADER;
static std::pair<string, t_enum*> get_test_enum_data(t_program* program);
- static std::pair<string, t_const*> get_test_void_const_data(t_netcore_generator* gen);
- static std::pair<string, t_const*> get_test_string_const_data(t_netcore_generator* gen);
- static std::pair<string, t_const*> get_test_bool_const_data(t_netcore_generator* gen);
- static std::pair<string, t_const*> get_test_i8_const_data(t_netcore_generator* gen);
- static std::pair<string, t_const*> get_test_i16_const_data(t_netcore_generator* gen);
- static std::pair<string, t_const*> get_test_i32_const_data(t_netcore_generator* gen);
- static std::pair<string, t_const*> get_test_i64_const_data(t_netcore_generator* gen);
- static std::pair<string, t_const*> get_test_double_const_data(t_netcore_generator* gen);
+ static std::pair<string, t_const*> get_test_void_const_data(t_netstd_generator* gen);
+ static std::pair<string, t_const*> get_test_string_const_data(t_netstd_generator* gen);
+ static std::pair<string, t_const*> get_test_bool_const_data(t_netstd_generator* gen);
+ static std::pair<string, t_const*> get_test_i8_const_data(t_netstd_generator* gen);
+ static std::pair<string, t_const*> get_test_i16_const_data(t_netstd_generator* gen);
+ static std::pair<string, t_const*> get_test_i32_const_data(t_netstd_generator* gen);
+ static std::pair<string, t_const*> get_test_i64_const_data(t_netstd_generator* gen);
+ static std::pair<string, t_const*> get_test_double_const_data(t_netstd_generator* gen);
};
diff --git a/compiler/cpp/tests/netcore/t_netcore_generator_helpers_tests.cc b/compiler/cpp/tests/netcore/t_netcore_generator_helpers_tests.cc
index 0bcbeed19..6acedc0f3 100644
--- a/compiler/cpp/tests/netcore/t_netcore_generator_helpers_tests.cc
+++ b/compiler/cpp/tests/netcore/t_netcore_generator_helpers_tests.cc
@@ -17,14 +17,14 @@
#include "../catch/catch.hpp"
#include <thrift/parse/t_program.h>
-#include <thrift/generate/t_netcore_generator.h>
+#include <thrift/generate/t_netstd_generator.h>
using std::vector;
-TEST_CASE("t_netcore_generator::netcore_type_usings() without option wcf should return valid namespaces", "[helpers]")
+TEST_CASE("t_netstd_generator::netstd_type_usings() without option wcf should return valid namespaces", "[helpers]")
{
string path = "CassandraTest.thrift";
- string name = "netcore";
+ string name = "netstd";
map<string, string> parsed_options = { { "union", "union" } };
string option_string = "";
@@ -39,19 +39,19 @@ TEST_CASE("t_netcore_generator::netcore_type_usings() without option wcf should
"using Thrift.Collections;\n" + endl;
t_program* program = new t_program(path, name);
- t_netcore_generator* gen = new t_netcore_generator(program, parsed_options, option_string);
+ t_netstd_generator* gen = new t_netstd_generator(program, parsed_options, option_string);
REQUIRE_FALSE(gen->is_wcf_enabled());
- REQUIRE(gen->netcore_type_usings() == expected_namespaces);
+ REQUIRE(gen->netstd_type_usings() == expected_namespaces);
delete gen;
delete program;
}
-TEST_CASE("t_netcore_generator::netcore_type_usings() with option wcf should return valid namespaces", "[helpers]")
+TEST_CASE("t_netstd_generator::netstd_type_usings() with option wcf should return valid namespaces", "[helpers]")
{
string path = "CassandraTest.thrift";
- string name = "netcore";
+ string name = "netstd";
map<string, string> parsed_options = { { "wcf", "wcf" } };
string option_string = "";
@@ -68,19 +68,19 @@ TEST_CASE("t_netcore_generator::netcore_type_usings() with option wcf should ret
"using System.Runtime.Serialization;\n" + endl;
t_program* program = new t_program(path, name);
- t_netcore_generator* gen = new t_netcore_generator(program, parsed_options, option_string);
+ t_netstd_generator* gen = new t_netstd_generator(program, parsed_options, option_string);
REQUIRE(gen->is_wcf_enabled());
- REQUIRE(gen->netcore_type_usings() == expected_namespaces_wcf);
+ REQUIRE(gen->netstd_type_usings() == expected_namespaces_wcf);
delete gen;
delete program;
}
-TEST_CASE("t_netcore_generator should contains latest C# keywords to normalize with @", "[helpers]")
+TEST_CASE("t_netstd_generator should contains latest C# keywords to normalize with @", "[helpers]")
{
string path = "CassandraTest.thrift";
- string name = "netcore";
+ string name = "netstd";
map<string, string> parsed_options = { { "wcf", "wcf" } };
string option_string = "";
vector<string> current_keywords = {
@@ -190,7 +190,7 @@ TEST_CASE("t_netcore_generator should contains latest C# keywords to normalize w
string missed_keywords = "";
t_program* program = new t_program(path, name);
- t_netcore_generator* gen = new t_netcore_generator(program, parsed_options, option_string);
+ t_netstd_generator* gen = new t_netstd_generator(program, parsed_options, option_string);
gen->init_generator();
map<string, int> generators_keywords = gen->get_keywords_list();
diff --git a/compiler/cpp/tests/netcore/t_netcore_generator_initialization_tests.cc b/compiler/cpp/tests/netcore/t_netcore_generator_initialization_tests.cc
index ec17733bd..530e290ac 100644
--- a/compiler/cpp/tests/netcore/t_netcore_generator_initialization_tests.cc
+++ b/compiler/cpp/tests/netcore/t_netcore_generator_initialization_tests.cc
@@ -17,35 +17,35 @@
#include "../catch/catch.hpp"
#include <thrift/parse/t_program.h>
-#include <thrift/generate/t_netcore_generator.h>
+#include <thrift/generate/t_netstd_generator.h>
-TEST_CASE( "t_netcore_generator should throw error with unknown options", "[initialization]" )
+TEST_CASE( "t_netstd_generator should throw error with unknown options", "[initialization]" )
{
string path = "CassandraTest.thrift";
- string name = "netcore";
+ string name = "netstd";
map<string, string> parsed_options = { { "keys", "keys" } };
string option_string = "";
t_program* program = new t_program(path, name);
- t_netcore_generator* gen = nullptr;
+ t_netstd_generator* gen = nullptr;
- REQUIRE_THROWS(gen = new t_netcore_generator(program, parsed_options, option_string));
+ REQUIRE_THROWS(gen = new t_netstd_generator(program, parsed_options, option_string));
delete gen;
delete program;
}
-TEST_CASE("t_netcore_generator should create valid instance with valid options", "[initialization]")
+TEST_CASE("t_netstd_generator should create valid instance with valid options", "[initialization]")
{
string path = "CassandraTest.thrift";
- string name = "netcore";
+ string name = "netstd";
map<string, string> parsed_options = { { "wcf", "wcf" }, { "nullable", "nullable"} };
string option_string = "";
t_program* program = new t_program(path, name);
- t_netcore_generator* gen = nullptr;
+ t_netstd_generator* gen = nullptr;
- REQUIRE_NOTHROW(gen = new t_netcore_generator(program, parsed_options, option_string));
+ REQUIRE_NOTHROW(gen = new t_netstd_generator(program, parsed_options, option_string));
REQUIRE(gen != nullptr);
REQUIRE(gen->is_wcf_enabled());
REQUIRE(gen->is_nullable_enabled());
@@ -57,15 +57,15 @@ TEST_CASE("t_netcore_generator should create valid instance with valid options",
delete program;
}
-TEST_CASE("t_netcore_generator should pass init succesfully", "[initialization]")
+TEST_CASE("t_netstd_generator should pass init succesfully", "[initialization]")
{
string path = "CassandraTest.thrift";
- string name = "netcore";
+ string name = "netstd";
map<string, string> parsed_options = { { "wcf", "wcf" },{ "nullable", "nullable" } };
string option_string = "";
t_program* program = new t_program(path, name);
- t_netcore_generator* gen = new t_netcore_generator(program, parsed_options, option_string);
+ t_netstd_generator* gen = new t_netstd_generator(program, parsed_options, option_string);
REQUIRE_NOTHROW(gen->init_generator());