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

Side by Side Diff: experimental/c_salt/notification_test.cc

Issue 10928195: First round of dead file removal (Closed) Base URL: https://github.com/samclegg/nativeclient-sdk.git@master
Patch Set: Created 8 years, 3 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 unified diff | Download patch
« no previous file with comments | « experimental/c_salt/notification_ptrs.h ('k') | experimental/c_salt/npapi/browser_3d_device.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2010 The Ginsu Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can
3 // be found in the LICENSE file.
4
5 #include "c_salt/notification.h"
6 #include "gmock/gmock.h"
7 #include "gtest/gtest.h"
8
9 namespace {
10 const char* const kNotificationName = "notification";
11 const char* const kOtherNotificationName = "other notification";
12 const char* const kPublisher1 = "publisher1";
13 const int kIntValue42 = 42;
14 } // namespace
15
16 using c_salt::Notification;
17
18 class NotificationTest : public ::testing::Test {
19 protected:
20 virtual void SetUp() {}
21 };
22
23 // Verify that the default ctor caches the name,and produces an anonymous
24 // notification with an empty payload.
25 TEST_F(NotificationTest, DefaultCtor) {
26 Notification note(kNotificationName);
27 EXPECT_EQ(kNotificationName, note.name());
28 EXPECT_TRUE(note.data()->empty());
29 EXPECT_EQ("", note.publisher_name());
30 }
31
32 TEST_F(NotificationTest, IntCtor) {
33 Notification::SharedNotificationValue
34 int_value(new Notification::NotificationValue(kIntValue42));
35 Notification note(kNotificationName, int_value, kPublisher1);
36 EXPECT_FALSE(note.data()->empty());
37 EXPECT_EQ(kIntValue42, boost::any_cast<int>(*note.data()));
38 }
OLDNEW
« no previous file with comments | « experimental/c_salt/notification_ptrs.h ('k') | experimental/c_salt/npapi/browser_3d_device.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698