#include <lnv3/lnv3.h>


#include "validate.h"
#include "funcList.h"


bool
ValidateUnaryMinus( const string& operation )
{
    if( operation != "unary-" ) return false;

    ln a, b, c;
    cin >> a >> b;

    c = -a;
    CheckForError( c, b, "unary-" );

    return true;
}


//  ============================================================


bool
ValidateUnaryPlus( const string& operation )
{
    if( operation != "unary+" ) return false;

    ln a, b, c;
    cin >> a >> b;

    c = +a;
    CheckForError( c, b, "unary+" );

    return true;
}


//  ============================================================


static TestFunctionList RegFunc1( ValidateUnaryMinus );
static TestFunctionList RegFunc2( ValidateUnaryPlus );