var tape=require("tape"),toBuffer=require("./");tape("buffer returns buffer",function(e){e.same(toBuffer(Buffer("hi")),Buffer("hi")),e.end()}),tape("string returns buffer",function(e){e.same(toBuffer("hi"),Buffer("hi")),e.end()}),tape("string + enc returns buffer",function(e){e.same(toBuffer("6869","hex"),Buffer("hi")),e.end()}),tape("other input throws",function(e){try{toBuffer(42)}catch(f){e.same(f.message,"Input should be a buffer or a string"),e.end()}});