Skip to content

Commit da5cb58

Browse files
committed
Add README
1 parent 998835b commit da5cb58

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Basic sample for writing C/C++ GTest tests and running them on Android emulators / devices.
2+
3+
This project uses the Gradle build system. You don't need an IDE to build and execute it but Android Studio is recommended.
4+
5+
1. Download the project code, preferably using `git clone`.
6+
2. In Android Studio, select *File* | *Open...* and point to the `./build.gradle` file.
7+
3. Check out the relevant code:
8+
* The C++ sources and tests are in `src/main/cpp`
9+
* The device tests (which wrap the native tests) are in `src/androidTest/java`
10+
4. Create and run the Instrumented test configuration
11+
* Open the `AdderTest` file, and click the run icon in the gutter, or
12+
* Manually create a configuration.
13+
* Open *Run* menu | *Edit Configurations*
14+
* Add a new *Android Instrumented Tests* configuration
15+
* Choose the `app` module
16+
* Connect a device or start an emulator
17+
* Run the newly created configuration
18+
19+
If you are using Android Studio, the *Run* window will show the test results.

0 commit comments

Comments
 (0)