49 string FindRubyTestDir() {
60 void RubyTest(
string proto_file) {
61 string ruby_tests = FindRubyTestDir();
66 ruby::Generator ruby_generator;
72 ruby_tests + proto_file +
".proto",
82 string proto_path =
"--proto_path=" +
TestTempDir();
83 string proto_target =
TestTempDir() + proto_file +
".proto";
84 const char* argv[] = {
99 string expected_output;
101 ruby_tests + proto_file +
"_pb.rb",
107 TEST(RubyGeneratorTest, Proto3GeneratorTest) {
108 RubyTest(
"/ruby_generated_code");
111 TEST(RubyGeneratorTest, Proto2GeneratorTest) {
112 RubyTest(
"/ruby_generated_code_proto2");
115 TEST(RubyGeneratorTest, Proto3ImplicitPackageTest) {
116 RubyTest(
"/ruby_generated_pkg_implicit");
119 TEST(RubyGeneratorTest, Proto3ExplictPackageTest) {
120 RubyTest(
"/ruby_generated_pkg_explicit");
123 TEST(RubyGeneratorTest, Proto3ExplictLegacyPackageTest) {
124 RubyTest(
"/ruby_generated_pkg_explicit_legacy");