Skip to content

sheeeng/googletest-macos

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

googletest-macos

Project derived from https://gist.github.com/butuzov/e7df782c31171f9563057871d0ae444a gist.

The scripts to install Google Test on macOS platform.

Prerequisites

  • Brew /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
  • CMake brew install cmake

It will install gmock and gtest under brew directories.

Usage

chmod +x ./install.sh
sudo ./install.sh

Example

#include "gtest/gtest.h"

TEST( ExampleTest, First ) {
  EXPECT_TRUE(  true );
}

int main(int argc, char **argv) {
  ::testing::InitGoogleTest(&argc, argv);
  return RUN_ALL_TESTS();
}
clang++ -lgtest test.cpp -o  ./test -std=c++14 && ./test

About

Project derived on https://gist.github.com/butuzov/e7df782c31171f9563057871d0ae444a gist.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors