def test_fasta(self):
    results = [(1, 'GG*ctt**tgagc*'), (20, 'GGCCGGGCGCGGTGGCTCACGCCTGTAATCCCAGCACTTT*cttBtatcatatgctaKggNcataaaSatgtaaaDcDRtBggDtctttataattcBgtcg**tacgtgtagcctagtgtttgtgttgcgttatagtctatttgtggacacagtatggtcaaa**tgacgtcttttgatctgacggcgttaacaaagatactctg*'), (50, 'GGCCGGGCGCGGTGGCTCACGCCTGTAATCCCAGCACTTTGGGAGGCCGAGGCGGGCGGA*TCACCTGAGGTCAGGAGTTCGAGACCAGCCTGGCCAACAT*cttBtatcatatgctaKggNcataaaSatgtaaaDcDRtBggDtctttataattcBgtcg**tactDtDagcctatttSVHtHttKtgtHMaSattgWaHKHttttagacatWatgtRgaaa**NtactMcSMtYtcMgRtacttctWBacgaa**agatactctgggcaacacacatacttctctcatgttgtttcttcggacctttcataacct**ttcctggcacatggttagctgcacatcacaggattgtaagggtctagtggttcagtgagc**ggaatatcattcgtcggtggtgttaatctatctcggtgtagcttataaatgcatccgtaa**gaatattatgtttatttgtcggtacgttcatggtagtggtgtcgccgatttagacgtaaa**ggcatgtatg*')]
    old = self.emcc_args
    orig_src = open(path_from_root('tests', 'fasta.cpp')).read()

    def test(extra_args):
        self.emcc_args = (old + extra_args)
        for precision in [0, 1, 2]:
            self.set_setting('PRECISE_F32', precision)
            for t in ['float', 'double']:
                print(precision, t)
                src = orig_src.replace('double', t)
                self.build(src, self.get_dir(), 'fasta.cpp')
                for (arg, output) in results:
                    self.do_run('fasta.cpp.o.js', output, [str(arg)], (lambda x, err: x.replace('\n', '*')), no_build=True)
                shutil.copyfile('fasta.cpp.o.js', ('%d_%s.js' % (precision, t)))
    test([])
def test_fasta(self):
    results = [(1, 'GG*ctt**tgagc*'), (20, 'GGCCGGGCGCGGTGGCTCACGCCTGTAATCCCAGCACTTT*cttBtatcatatgctaKggNcataaaSatgtaaaDcDRtBggDtctttataattcBgtcg**tacgtgtagcctagtgtttgtgttgcgttatagtctatttgtggacacagtatggtcaaa**tgacgtcttttgatctgacggcgttaacaaagatactctg*'), (50, 'GGCCGGGCGCGGTGGCTCACGCCTGTAATCCCAGCACTTTGGGAGGCCGAGGCGGGCGGA*TCACCTGAGGTCAGGAGTTCGAGACCAGCCTGGCCAACAT*cttBtatcatatgctaKggNcataaaSatgtaaaDcDRtBggDtctttataattcBgtcg**tactDtDagcctatttSVHtHttKtgtHMaSattgWaHKHttttagacatWatgtRgaaa**NtactMcSMtYtcMgRtacttctWBacgaa**agatactctgggcaacacacatacttctctcatgttgtttcttcggacctttcataacct**ttcctggcacatggttagctgcacatcacaggattgtaagggtctagtggttcagtgagc**ggaatatcattcgtcggtggtgttaatctatctcggtgtagcttataaatgcatccgtaa**gaatattatgtttatttgtcggtacgttcatggtagtggtgtcgccgatttagacgtaaa**ggcatgtatg*')]
    old = self.emcc_args
    orig_src = open(path_from_root('tests', 'fasta.cpp')).read()

    def test(extra_args):
        self.emcc_args = (old + extra_args)
        for precision in [0, 1, 2]:
            self.set_setting('PRECISE_F32', precision)
            for t in ['float', 'double']:
                print(precision, t)
                src = orig_src.replace('double', t)
                self.build(src, self.get_dir(), 'fasta.cpp')
                for (arg, output) in results:
                    self.do_run('fasta.cpp.o.js', output, [str(arg)], (lambda x, err: x.replace('\n', '*')), no_build=True)
                shutil.copyfile('fasta.cpp.o.js', ('%d_%s.js' % (precision, t)))
    test([])