processor: add tests.

@duncanbeevers , I wonder what do you think about stack processor rewrite and tests. Do you know about more stack examples that are worth to be tested?