| hello,\ world lang:python | hello,\ world lang:c++ | hello,\ world lang:assembly |
| hello,\ world lang:perl | hello,\ world lang:c |
23: def testSetSession(self): 24: self.sessions.set('random_key', text='hello, world!') 25: self.assertEqual(self.sessions.get('random_key', 'text'), 26: 'hello, world!') 27: 28: def testUpdateSession(self): 29: self.sessions.set('random_key', text='hello, world!') 30: self.assertEqual(self.sessions.get('random_key', 'text'), 31: 'hello, world!') 32: self.sessions.set('random_key', text='nope')
22: using base::SysWideToUTF8; 23: EXPECT_EQ("Hello, world", SysWideToUTF8(L"Hello, world")); 24: EXPECT_EQ("\xe4\xbd\xa0\xe5\xa5\xbd", SysWideToUTF8(L"\x4f60\x597d"));
51: using base::SysUTF8ToWide; 52: EXPECT_EQ(L"Hello, world", SysUTF8ToWide("Hello, world")); 53: EXPECT_EQ(L"\x4f60\x597d", SysUTF8ToWide("\xe4\xbd\xa0\xe5\xa5\xbd"));
97: ScopedSetLocale locale("en_US.utf-8"); 98: EXPECT_EQ("Hello, world", SysWideToNativeMB(L"Hello, world")); 99: EXPECT_EQ("\xe4\xbd\xa0\xe5\xa5\xbd", SysWideToNativeMB(L"\x4f60\x597d"));
Google Home - Google Code - Discuss - Terms of Service - Help - Submit Your Code
©2010 Google - Privacy