Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(295)

Unified Diff: mojo/services/files/public/cpp/tests/output_stream_file_unittest.cc

Issue 1375313006: For c++, Generate enum classes instead of enum from mojom. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: mojo/services/files/public/cpp/tests/output_stream_file_unittest.cc
diff --git a/mojo/services/files/public/cpp/tests/output_stream_file_unittest.cc b/mojo/services/files/public/cpp/tests/output_stream_file_unittest.cc
index f35ff67db0f7da159b6c2869deac3f9d2ab8943c..678131b71c5faa8aba5338fe714a3e90d48d60ce 100644
--- a/mojo/services/files/public/cpp/tests/output_stream_file_unittest.cc
+++ b/mojo/services/files/public/cpp/tests/output_stream_file_unittest.cc
@@ -79,9 +79,9 @@ void TestWrite(mojo::files::File* file,
TestClient* client,
const std::string& s) {
bool write_cb_called = false;
- mojo::files::Error error = mojo::files::ERROR_INTERNAL;
+ mojo::files::Error error = mojo::files::Error::INTERNAL;
uint32_t num_bytes_written = 0;
- file->Write(StringToArray(s), 0, mojo::files::WHENCE_FROM_CURRENT,
+ file->Write(StringToArray(s), 0, mojo::files::Whence::FROM_CURRENT,
[&write_cb_called, &error, &num_bytes_written](
mojo::files::Error e, uint32_t n) {
write_cb_called = true;
@@ -110,13 +110,13 @@ void TestWrite(mojo::files::File* file,
RunMessageLoop();
}
EXPECT_TRUE(write_cb_called);
- EXPECT_EQ(mojo::files::ERROR_OK, error);
+ EXPECT_EQ(mojo::files::Error::OK, error);
EXPECT_EQ(s.size(), num_bytes_written);
}
void TestClose(mojo::files::File* file, TestClient* client) {
bool close_cb_called = false;
- mojo::files::Error error = mojo::files::ERROR_INTERNAL;
+ mojo::files::Error error = mojo::files::Error::INTERNAL;
file->Close([&close_cb_called, &error](mojo::files::Error e) {
close_cb_called = true;
error = e;
@@ -137,7 +137,7 @@ void TestClose(mojo::files::File* file, TestClient* client) {
RunMessageLoop();
}
EXPECT_TRUE(close_cb_called);
- EXPECT_EQ(mojo::files::ERROR_OK, error);
+ EXPECT_EQ(mojo::files::Error::OK, error);
}
TEST_F(OutputStreamFileTest, Basic) {

Powered by Google App Engine
This is Rietveld 408576698