From 6e33b787d3d1a14fa366dc9b28a21d536da4becd Mon Sep 17 00:00:00 2001
From: John Kessenich <cepheus@frii.com>
Date: Sun, 22 Oct 2017 23:17:18 -0600
Subject: [PATCH] Tests: Add test for GLSL +-#INF.

---
 Test/baseResults/numeral.frag.out | 36 +++++++++++++++++++++++++++++++
 Test/numeral.frag                 |  3 +++
 2 files changed, 39 insertions(+)

diff --git a/Test/baseResults/numeral.frag.out b/Test/baseResults/numeral.frag.out
index 11def1205..3180bbdfa 100644
--- a/Test/baseResults/numeral.frag.out
+++ b/Test/baseResults/numeral.frag.out
@@ -404,6 +404,21 @@ ERROR: node is still EOpNull!
 0:103      'g6' ( global int)
 0:103      Constant:
 0:103        -2 (const int)
+0:104  Sequence
+0:104    move second child to first child ( temp float)
+0:104      'inf1' ( global float)
+0:104      Constant:
+0:104        -1.#INF
+0:105  Sequence
+0:105    move second child to first child ( temp float)
+0:105      'inf2' ( global float)
+0:105      Constant:
+0:105        +1.#INF
+0:106  Sequence
+0:106    move second child to first child ( temp float)
+0:106      'inf3' ( global float)
+0:106      Constant:
+0:106        +1.#INF
 0:?   Linker Objects
 0:?     'c2' (layout( location=2) out 4-component vector of float)
 0:?     'c3' (layout( location=3) out 4-component vector of float)
@@ -417,6 +432,9 @@ ERROR: node is still EOpNull!
 0:?     'g4' ( global int)
 0:?     'g5' ( global int)
 0:?     'g6' ( global int)
+0:?     'inf1' ( global float)
+0:?     'inf2' ( global float)
+0:?     'inf3' ( global float)
 
 
 Linked fragment stage:
@@ -812,6 +830,21 @@ ERROR: node is still EOpNull!
 0:103      'g6' ( global int)
 0:103      Constant:
 0:103        -2 (const int)
+0:104  Sequence
+0:104    move second child to first child ( temp float)
+0:104      'inf1' ( global float)
+0:104      Constant:
+0:104        -1.#INF
+0:105  Sequence
+0:105    move second child to first child ( temp float)
+0:105      'inf2' ( global float)
+0:105      Constant:
+0:105        +1.#INF
+0:106  Sequence
+0:106    move second child to first child ( temp float)
+0:106      'inf3' ( global float)
+0:106      Constant:
+0:106        +1.#INF
 0:?   Linker Objects
 0:?     'c2' (layout( location=2) out 4-component vector of float)
 0:?     'c3' (layout( location=3) out 4-component vector of float)
@@ -825,4 +858,7 @@ ERROR: node is still EOpNull!
 0:?     'g4' ( global int)
 0:?     'g5' ( global int)
 0:?     'g6' ( global int)
+0:?     'inf1' ( global float)
+0:?     'inf2' ( global float)
+0:?     'inf3' ( global float)
 
diff --git a/Test/numeral.frag b/Test/numeral.frag
index cc0862ccd..39814f4ed 100644
--- a/Test/numeral.frag
+++ b/Test/numeral.frag
@@ -101,3 +101,6 @@ uint g3 = 4294967294u;
 int g4 = 4294967296;   // ERROR, too big
 int g5 = 4294967295;
 int g6 = 4294967294;
+float inf1 = -1.#INF;
+float inf2 =  1.#INF;
+float inf3 = +1.#INF;
-- 
GitLab