aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authordan sinclair <dsinclair@chromium.org>2019-05-21 12:14:11 -0400
committerDavid Neto <dneto@google.com>2019-05-21 09:14:11 -0700
commite73da38f453e1927eed02d52b517107fadefbde0 (patch)
tree5f290f989a422306b117c9d0f0d704dd9192a8e9 /docs
parentb1f670eac03d420dca9c10dc81cefc721c881dc2 (diff)
downloadamber-e73da38f453e1927eed02d52b517107fadefbde0.tar.gz
[amberscript] Add TOLERANCE parsing. (#517)
This CL adds the TOLERANCE flag in to the EXPECT parsing. The TOLERANCE requires an EQ buffer comparison (to match how VkScript works). Fixes #418
Diffstat (limited to 'docs')
-rw-r--r--docs/amber_script.md9
1 files changed, 5 insertions, 4 deletions
diff --git a/docs/amber_script.md b/docs/amber_script.md
index 72f5ac9..aeea59d 100644
--- a/docs/amber_script.md
+++ b/docs/amber_script.md
@@ -385,10 +385,11 @@ CLEAR {pipeline}
EXPECT {buffer_name} IDX _x_ {comparator} _value_+
# Checks that |buffer_name| at |x| has values within |tolerance| of |value|
-# when compared with the given |comparator|. The |tolerance| can be specified
-# as 1-4 float values separated by spaces.
-EXPECT {buffer_name} IDX _x_ TOLERANCE \
- _tolerance_{1,4} {comparator} _value_+
+# The |tolerance| can be specified as 1-4 float values separated by spaces.
+# The tolerances may be given as a percentage by placing a '%' symbol after
+# the value. If less tolerance values are provided then are needed for a given
+# data component the default tolerance will be applied.
+EXPECT {buffer_name} IDX _x_ TOLERANCE _tolerance_{1,4} EQ _value_+
# Checks that |buffer_name| at |x|, |y| for |width|x|height| pixels has the
# given |r|, |g|, |b| values. Each r, g, b value is an integer from 0-255.