GRU node example
#include <inttypes.h>
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
static bool test_set_next() {
uint32_t value1 = 10;
uint32_t value2 = 20;
if (d1 == 20) {
if (d2 == 10) {
if (node1 != NULL || node2 != NULL) {
printf("Node incorrectly destroyed\n");
return false;
}
return true;
}
}
if (node1 != NULL || node2 != NULL) {
printf("Node incorrectly destroyed\n");
}
return false;
}
static bool test_set_previous() {
uint32_t value1 = 10;
uint32_t value2 = 20;
if (d1 == 20) {
if (d2 == 10) {
if (node1 != NULL || node2 != NULL) {
printf("Node incorrectly destroyed\n");
return false;
}
return true;
}
}
if (node1 != NULL || node2 != NULL) {
printf("Node incorrectly destroyed\n");
}
return false;
}
int main(
int argc,
char **argv) {
if (test_set_next()) {
if (test_set_previous()) {
return EXIT_SUCCESS;
}
}
return EXIT_FAILURE;
}