[Swift-devel] writeData() output

Mihael Hategan hategan at mcs.anl.gov
Mon Jun 27 12:31:28 CDT 2011


Fixed in swift/trunk/r4696.

On Fri, 2011-06-24 at 19:37 -0500, Alberto Chavez wrote:
> Hi,
> I have been using suite.sh to run all available tests for swift, and
> there are a couple of them that use writeData() to generate output;
> however the output seems odd to me. 
> For instance, the following script:
> 
> 
> type file;
> type S { string l; string c; string r; }
> S s[];
> file f <"writeDataStructArray2.out">;
> f=writeData(s);
> s[2].l = "baz";
> s[2].c = "BAZ";
> s[2].r = "Baz";
> s[3].l = "qux";
> s[3].c = "QUX";
> s[3].r = "Qux";
> s[0].l = "foo";
> s[0].c = "FOO";
> s[0].r = "Foo";
> s[1].l = "bar";
> s[1].c = "BAR";
> s[1].r = "Bar";
> s[4].l = "frrrr";
> s[4].c = "FRRRR";
> s[4].r = "Frrrr";
> Swift 0.92.1 generates writeDataStructArray2.out:
> r c l 
> Foo FOO foo 
> Bar BAR bar 
> Baz BAZ baz 
> Qux QUX qux 
> Frrrr FRRRR frrrr 
> 
> But, Trunk generates writeDataStructArray2.out
> r c l 
> s[0].r:string = Foo - Closed s[0].c:string = FOO - Closed s[0].l:string = foo - Closed 
> s[1].r:string = Bar - Closed s[1].c:string = BAR - Closed s[1].l:string = bar - Closed 
> s[2].r:string = Baz - Closed s[2].c:string = BAZ - Closed s[2].l:string = baz - Closed 
> s[3].r:string = Qux - Closed s[3].c:string = QUX - Closed s[3].l:string = qux - Closed 
> s[4].r:string = Frrrr - Closed s[4].c:string = FRRRR - Closed s[4].l:string = frrrr - Closed 
> 
> 
> and I am uncertain whether to consider trunk output as correct or
> not. 
> 
> 
> Alberto.
> _______________________________________________
> Swift-devel mailing list
> Swift-devel at ci.uchicago.edu
> https://lists.ci.uchicago.edu/cgi-bin/mailman/listinfo/swift-devel





More information about the Swift-devel mailing list