Custom Query (424 matches)

Filters
 
Or
 
  
 
Columns

Show under each result:


Results (16 - 18 of 424)

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
Ticket Resolution Summary Owner Reporter
#494 fixed construction of array with array_buffer storage Maxim Reznik vadim.godunko
Description
with Interfaces;

package Test4 is

   type Real is new Interfaces.IEEE_Float_64;

   type Matrix_4x4 is
     array (Positive range 1 .. 4, Positive range 1 .. 4) of Real;

   type GLfloat is new Interfaces.IEEE_Float_32;

   type GLfloat_Matrix_4x4 is
     array (Positive range 1 .. 4, Positive range 1 .. 4) of GLfloat
       with Convention => Fortran;
   pragma JavaScript_Array_Buffer (GLfloat_Matrix_4x4);

   function Convert (Item : Matrix_4x4) return GLfloat_Matrix_4x4;

   procedure Test;

end Test4;
package body Test4 is

   function Convert (Item : Matrix_4x4) return GLfloat_Matrix_4x4 is
   begin
      return
       (1 =>
          (1 => GLfloat (Item (1, 1)),
           2 => GLfloat (Item (1, 2)),
           3 => GLfloat (Item (1, 3)),
           4 => GLfloat (Item (1, 4))),
        2 =>
          (1 => GLfloat (Item (2, 1)),
           2 => GLfloat (Item (2, 2)),
           3 => GLfloat (Item (2, 3)),
           4 => GLfloat (Item (2, 4))),
        3 =>
          (1 => GLfloat (Item (3, 1)),
           2 => GLfloat (Item (3, 2)),
           3 => GLfloat (Item (3, 3)),
           4 => GLfloat (Item (3, 4))),
        4 =>
          (1 => GLfloat (Item (4, 1)),
           2 => GLfloat (Item (4, 2)),
           3 => GLfloat (Item (4, 3)),
           4 => GLfloat (Item (4, 4))));
   end Convert;

   procedure Test is
      S : constant Matrix_4x4
        := (1 => (0.1, 0.2, 0.3, 0.4),
            2 => (0.5, 0.6, 0.7, 0.8),
            3 => (0.9, 1.0, 1.1, 1.2),
            4 => (1.3, 1.4, 1.5, 1.6));
      E : constant GLfloat_Matrix_4x4
        := (1 => (0.1, 0.2, 0.3, 0.4),
            2 => (0.5, 0.6, 0.7, 0.8),
            3 => (0.9, 1.0, 1.1, 1.2),
            4 => (1.3, 1.4, 1.5, 1.6));
      R : constant GLfloat_Matrix_4x4 := Convert (S);

   begin
      if E /= R then
         raise Program_Error;
      end if;
   end Test;

end Test4;
#493 fixed compilation unit mapping files support vadim.godunko
Description

To implement support for GNAT-style compilation unit mapping files.

#492 fixed utf-8 codec fails on emoji Maxim Reznik Maxim Reznik
Description

Matreshka decodes \u1F60A (😊) into utf-8 incorrectly. It gets 0xf0, 0xdf, 0x98, 0x8a instead of 0xF0, 0x9F, 0x98, 0x8A

Test case:

with Ada.Streams;
with League.Strings;
with League.Text_Codecs;
procedure Main is
   use type Ada.Streams.Stream_Element_Array;
   Line : constant Wide_Wide_String :=
     (1 => Wide_Wide_Character'Val (16#1F60A#));  --  😊
   Text : constant League.Strings.Universal_String :=
     League.Strings.To_Universal_String (Line);
   UTF8 : constant League.Text_Codecs.Text_Codec :=
     League.Text_Codecs.Codec (League.Strings.To_Universal_String ("utf-8"));
   Raw  : constant Ada.Streams.Stream_Element_Array :=
     UTF8.Encode (Text).To_Stream_Element_Array;
begin
   if Raw /= (16#F0#, 16#9F#, 16#98#, 16#8A#) then
      raise Program_Error;
   end if;
end Main;
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
Note: See TracQuery for help on using queries.