Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed
Heston/Heston_test.h
- Committer:
- el18jgb
- Date:
- 2020-05-24
- Revision:
- 22:7406068f6c59
- Parent:
- 13:cfdfe60a2327
File content as of revision 22:7406068f6c59:
#ifndef HESTON_TEST_H
#define HESTON_TEST_H
/** Heston class Test
* @brief Checks to do with heston class
* @author Jospeh Body, University of Leeds
* @date May 2020
* @return true if test are passed
*/
bool Heston_test_initial()
{
// Initialise
Heston heston;
heston.init(); //_x = 42 _y = 24
// Read the position
Vector2D read_pos_1 = heston.get_pos();
printf("%f, %f\n", read_pos_1.x, read_pos_1.y);
// Now check that both the position is as expected
bool success_flag = false;
// Fail the test if the initial position is wrong
if (read_pos_1.x == 42 || read_pos_1.y == 24) {
success_flag = true;
}
return success_flag;
}
#endif