This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
a |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <memory> | |
struct Base : public std::enable_shared_from_this<Base> | |
{ | |
int a; | |
virtual void f() const { std::cout << "I am base!\n"; } | |
virtual ~Base() {} | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//python file.py | |
#-*- coding: utf-8 -*- | |
import json | |
with open('settings.json') as setting_file: | |
settings = json.load(setting_file) | |
containers = settings['containers'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
int main(){ | |
int a[10],b[10],i,j,f; | |
// receber vetor a | |
for (i=0;i<10;i++){ | |
printf("digite o valor de %d:",i+1); | |
scanf("%d",&a[i]); | |
} | |
// zerar vetor b |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1>------ Build started: Project: gtest, Configuration: Release Win32 ------ | |
1>gtest-all.cc | |
1>gtest.vcxproj -> D:\Lng\googletest\googletest\msvc\gtest/Release\gtest.lib | |
2>------ Build started: Project: gtest_main, Configuration: Release Win32 ------ | |
2>gtest_main.cc | |
2>gtest_main.vcxproj -> D:\Lng\googletest\googletest\msvc\gtest/Release\gtest_main.lib | |
3>------ Build started: Project: gtest_unittest, Configuration: Release Win32 ------ | |
4>------ Build started: Project: gtest_prod_test, Configuration: Release Win32 ------ | |
3>gtest_unittest.cc | |
4>gtest_prod_test.cc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ActiveMQManagerFake : public ActiveMQManagerInterface { | |
private: | |
ActiveMQManagerInterface* mock; | |
public: | |
void setMock(ActiveMQManagerInterface* mock) { | |
if (mock != NULL) { | |
this->mock = mock; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ActiveMQManagerInterface | |
{ | |
public: | |
virtual void connectToServer() = 0; | |
virtual void sendMessageToServer() = 0; | |
virtual bool isConnected() = 0; | |
virtual bool start() = 0; | |
virtual bool stop() = 0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using ::testing::_; | |
using ::testing::Invoke; | |
class Foo { | |
public: | |
virtual ~Foo() {} | |
virtual char DoThis(int n) = 0; | |
virtual void DoThat(const char* s, int* p) = 0; | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Service *pService = NULL; | |
DECLSPEC bool StartDLL() | |
{ | |
bool ret = true; | |
if(!pService) | |
{ | |
if(!(pService = Service::getInstance())) | |
{ | |
ret = false; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ifndef __ENTRYPOINT_H_ | |
#define __ENTRYPOINT_H_ | |
extern "C" | |
{ | |
DECLSPEC bool StartDLL(); | |
DECLSPEC bool StopDLL(); | |
DECLSPEC bool InjectMock(void *mock); | |
} | |
#endif |
NewerOlder