GithubHelp home page GithubHelp logo

arduino-gmock-sample's Introduction

My Qiita posts My Qiita contributions My Qiita followers

GitHub Stats Top Languages

Hi there 👋

Here are some ideas to get you started:

  • 🔭 I’m currently working on @access-company
  • 🌱 I’m currently learning reinforcement learning and drone.
  • 💬 Ask me about IoT :)

arduino-gmock-sample's People

Contributors

ikeyasu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

arduino-gmock-sample's Issues

Makefile should allow a user editable dependency directories

In testing I've found I need to bring in a few other libraries. I'm currently doing this like so

DEP_DIR = ../../ringbuffer

# Flags passed to the preprocessor.
# Set Google Test's header directory as a system directory, such that
# the compiler doesn't generate warnings in Google Test headers.
CPPFLAGS += -isystem $(GTEST_DIR)/include -isystem $(GMOCK_DIR)/include \
        -I$(ARDUINO_MOCK_DIR)/include/arduino-mock/ \
        -I$(DEP_DIR)

but it only allows for a single include. If you're amenable some kind of bash iterator should allow a list of directories to be added

Support EEPROM

GOAL
Implement a mock module to emulate the EEPROM.
And also implement gtest unit tests and arduino sample programs to make sure your mock module.

STEPS TO DEVELOP YOUR MODULE

  1. Make sure “g++”, “git ”and “make” commands are installed in your computer.
  2. Clone arduino-gmock-sample project from my github repository. Do not forget sync sub modules.
  3. Build my arduino-mock project and run it. It currently has a mock module to emulate the Serial.
  4. Create EEPROM.h and EEPROM.cpp files under the “test/arduino-mock/“ directory. And implement those files to emulate the EEPROM.
  5. Create that EEPROMRead.ino and EEPROMWrite.ino files use your EEPROM emulation module in arduino-gmock-sample project. You may use following tutorials as a reference.
    http://arduino.cc/en/Tutorial/EEPROMRead
    http://arduino.cc/en/Tutorial/EEPROMWrite
  6. Create EEPROMWrite_unittest.cc and EEPROMRead_unittest.cc files under the “test/“ directory. And implement those files to test your arduino programs.
  7. Edit test/Makefile to compile them.

NOTE
The “test/arduino-mock” directory is submodule. Please create another pull request when modifying test/arduino-mock.

../Test Dir seems like bad form

Is there a reason you went away from googltest naming of USER_DIR to TEST_DIR which require $(TEST_DIR)../ Before all user paths? It seems like bad form and can easily be fixed by going to back the USER_DIR style.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.