Changeset 2444324
 Timestamp:
 Dec 3, 2019, 10:06:40 PM (3 years ago)
 Branches:
 armeh, enum, forallpointerdecay, jacob/cs343translation, master, newastuniqueexpr, pthreademulation, qualifiedEnum
 Children:
 3376ec9
 Parents:
 d131480
 Location:
 tests/vector
 Files:

 1 added
 2 edited
Legend:
 Unmodified
 Added
 Removed

tests/vector/.expect/vec2_int.txt
rd131480 r2444324 1 ctor(x,y):<1 .,2.>2 copy ctor:<1 .,2.>3 assignment:<3 .,4.2>4 move assignment:<1 .,2.>5 zeroinit:<0 .,0.>6 zeroassign:<0 .,0.>7 fillctor:<1 .23,1.23>8 ??:< 2,43>9 ?=?:< 125,657>10 ?:< 125,657>11 ?+?:< 23,245>12 ?+=?:< 23,245>1 ctor(x,y):<1,2> 2 copy ctor:<1,2> 3 assignment:<3,4> 4 move assignment:<1,2> 5 zeroinit:<0,0> 6 zeroassign:<0,0> 7 fillctor:<123,123> 8 ??:<1002,17> 9 ?=?:<1002,17> 10 ?:<1002,17> 11 ?+?:<1004,11> 12 ?+=?:<1004,11> 13 13 v*s:<45,825> 14 14 s*v:<45,825> 15 15 ?*=?:<45,825> 16 ?/?:<0,3> 17 ?/=?:<0,3> 18 limits:<2147483647,2147483648> 16 ?/?:<7,3> 17 ?/=?:<7,3> 19 18 dot_1:0 20 19 dot_2:32 21 length:522 20 length_squared:25 23 distance:9 24 normalize:<0,0> 25 normalize_2:<1,0> 26 project:<5,0> 27 project_2:<5.5,5.5> 28 reflect:<5.,6.> 29 refract:<5.,6.> 30 refract:<3.7594,4.5592> 31 faceforward_nochange:<4.,5.5> 32 faceforward_flip:<4.,5.5> 21 faceforward_nochange:<4,5> 22 faceforward_flip:<4,5> 
tests/vector/vec2_int.cfa
rd131480 r2444324 10 10 sout  "copy ctor:"  v2; 11 11 12 v2 = (vec2(int)){3, 4 2};12 v2 = (vec2(int)){3, 4}; 13 13 sout  "assignment:"  v2; 14 14 … … 22 22 sout  "zeroassign:"  v1; 23 23 24 vec2(int) v4 = {1 00};24 vec2(int) v4 = {123}; 25 25 sout  "fillctor:"  v4; 26 26 27 v1 = (vec2(int)){1 23, 343};28 sout  "??:"  (v1  (vec2(int)){1 21,300});27 v1 = (vec2(int)){1, 3}; 28 sout  "??:"  (v1  (vec2(int)){1003, 14}); 29 29 30 v1 = (vec2(int)){ 2, 1000};30 v1 = (vec2(int)){1003, 14}; 31 31 sout  "?=?:"  v1; 32 32 … … 34 34 sout  "?:"  v1; 35 35 36 v1 = (vec2(int)){1 5, 275};37 sout  "?+?:"  (v1 + (vec2(int)){ 8, 30});36 v1 = (vec2(int)){1, 3}; 37 sout  "?+?:"  (v1 + (vec2(int)){1003, 14}); 38 38 39 v1 += (vec2(int)){ 8, 30};39 v1 += (vec2(int)){1003, 14}; 40 40 sout  "?+=?:"  v1; 41 41 … … 48 48 sout  "?*=?:"  v1; 49 49 50 v1 = (vec2(int)){2 , 10};50 v1 = (vec2(int)){21, 10}; 51 51 sout  "?/?:"  (v1 / 3); 52 52 53 53 v1 /= 3; 54 54 sout  "?/=?:"  v1; 55 56 v1 = (vec2(int)){MAX, MIN};57 sout  "limits:"  v1;58 55 59 56 v1 = (vec2(int)){2, 3}; … … 65 62 66 63 v1 = (vec2(int)){4, 3}; 67 sout  "length:"  length(v1);68 69 64 sout  "length_squared:"  length_squared(v1); 70 65 71 v2 = (vec2(int)){6, 12};72 sout  "distance:"  distance(v1, v2);73 74 sout  "normalize:"  normalize(v2);75 sout  "normalize_2:"  normalize((vec2(int)){20,0});76 77 sout  "project:"  project((vec2(int)){5,6}, (vec2(int)){1, 0});78 sout  "project_2:"  project((vec2(int)){5,6}, (vec2(int)){1, 1});79 80 v1 = (vec2(int)){5,6};81 v2 = (vec2(int)){1,0};82 sout  "reflect:"  reflect(v1,v2);83 84 v2 = (vec2(int)){0,1};85 sout  "refract:"  refract(v1,v2,1);86 sout  "refract:"  refract(v1,v2,1/1.33f);87 88 66 vec2(int) geometric_normal = {5,6}; 89 vec2(int) perturbed_normal = {4,5 .5};90 vec2(int) eyeline = {1,0 .002};67 vec2(int) perturbed_normal = {4,5}; 68 vec2(int) eyeline = {1,0}; 91 69 sout  "faceforward_nochange:"  faceforward(perturbed_normal, eyeline, geometric_normal); 92 70 93 eyeline = (vec2(int)){1,0 .002};71 eyeline = (vec2(int)){1,0}; 94 72 sout  "faceforward_flip:"  faceforward(perturbed_normal, eyeline, geometric_normal); 95 73 }
Note: See TracChangeset
for help on using the changeset viewer.