# This file tests all of the error messages!  ...or maybe just some.

# Error messages resulting from lack of a local prefix

words .fun
.morefun
words .morefun

# Label not in namespace when there is no namespace, and as such,
# the current namespace is the name of the current file.

words look.here

# Local label does not exist under prefix.

one
  .two

two
  .one

words .two

# Label does not exist in namespace.

namespace hello
namespace wonderful
words hello.there
words bonjour.there

# I cannot figure out how to turn 'whatever' into a number,

words whatever

# The next three only show up in pass two since equations can technically
# contain labels, some of which may not be known until pass two.  I considered
# making them show up in pass one, but it complicates the source code for a
# benifit that I don't think really matters.  I've certainly never noticed
# until this point that these sorts of errors only show up in pass two, let
# alone caring that they don't.  Besides, if anything, the best idea is to
# make all errors show up in pass two.  I also considered this for a moment,
# but then I realized that section/label errors in pass one would cause
# other errors in pass two that wouldn't exist had the pass one errors not
# been present, and the last thing I want is for Sarcasm to work like GCC
# or Perl, where it spits out thousands of errors due to one little mistake.
# All things considered, its current behaviour is fucking sweet by comparison.

# Value does not fit into a word.
words -32769, 65536

# Value does not fit into a byte.
bytes -129, 256

# Value is not within -128 to +127
ld [st-129], a; ld [st+128], a

# -129 bytes is too far away
apples
data !0000000000000000000000000000000000000000000000000000000000000000
data !0000000000000000000000000000000000000000000000000000000000000000
data !0000000000000000000000000000000000000000000000000000000000000000
data !00000000000000000000000000000000000000000000000000000000000000
jr apples

# +128 bytes is too far away
jr oranges
data !0000000000000000000000000000000000000000000000000000000000000000
data !0000000000000000000000000000000000000000000000000000000000000000
data !0000000000000000000000000000000000000000000000000000000000000000
data !0000000000000000000000000000000000000000000000000000000000000000
oranges

# Error opening 'filename' for output

output 'nonexistantfolder/whatever.rom' $0000 $FFFF # Fuck, dammit!

# '[no local prefix]' namespace-style

namespace whocares
.whatever; jp .whatever

hateful.; jp hateful
loveful; jp loveful.

