Skip to content

Instantly share code, notes, and snippets.

@matthewphilyaw
matthewphilyaw / fixtures.ex
Last active December 31, 2015 17:09
Proposal for testing
defmodule Yggdrasil.Fixtures do
@moduledoc """
A module for fixtures for various tests
"""
def user do
quote do
@min_len 4
@password "password"
@short_password String.slice(@password, 1..(@min_len - 1))
#include "FIFO.h"
#include "common.h"
#define AccessBuffer(buffer, index, index_width) ((char *)(buffer))+((index) * (index_width))
int FIFO_Init(FIFOBuffer_TypeDef *buf, uint32_t maxSize, uint32_t bufferWidth, void *buffer) {
if (!buffer) {
return -1;
}
#include <stdio.h>
#include <stdlib.h>
#include <wiringPi.h>
int main(void) {
int errorno = wiringPiSetupGpio();
// No newline, so I missed this a few times
// debugging when it was the line above and this line only
// it gets instered before the prompt when the program finishes.
printf("Plpo");