Part Number: TM4C123GH6PM
Tool/software: Code Composer Studio
I want to write a unit test script code(.js ) to test a code written in in TM4c123GH6PM .I have taken a very simple code of adding two numbers to learn unit testing
#include <stdint.h>
#include <stdbool.h>
#include "inc/hw_memmap.h"
#include "inc/hw_types.h"
#include "driverlib/sysctl.h"
#include "driverlib/gpio.h"
int summer(int,int);
int i=0;
int c;
int m;
int main(void)
{
SysCtlClockSet(SYSCTL_SYSDIV_5|SYSCTL_USE_PLL|SYSCTL_XTAL_16MHZ|SYSCTL_OSC_MAIN);
m=summer(5,6);
}
int summer(int a,int b)
{
c=a+b;
return c;
}
I want to test the "summer" function ..I want to write a test script for same in .js . Can i access the variable "m" into the .js script in a conventional .js scripting. I learnt the tutorials like breakpoints and others which were the starting point tutorials ...
Thanking you