Update test_answers.txt

This commit is contained in:
blueloveTH 2024-01-20 22:33:07 +08:00
parent ca13bb4a0f
commit 5dab337485
4 changed files with 5 additions and 5 deletions

View File

@ -23,7 +23,7 @@ hello!
None
====== test voidp methods ======
<void* at 0x7b>
<void* at 0x000000000000007B>
123
====== test sizing and indexing ======

View File

@ -141,7 +141,7 @@ struct SStream{
SStream& operator<<(const char*);
SStream& operator<<(int);
SStream& operator<<(unsigned int);
SStream& operator<<(unsigned long);
SStream& operator<<(uint64_t);
SStream& operator<<(i64);
SStream& operator<<(f64);
SStream& operator<<(const std::string&);

View File

@ -3,7 +3,7 @@
namespace pkpy {
REPL::REPL(VM* vm) : vm(vm){
vm->stdout_write("pocketpy " PK_VERSION " (" __DATE__ ", " __TIME__ ") ");
vm->stdout_write(fmt("[", (int)sizeof(void*)*8, " bit] on ", kPlatformStrings[PK_SYS_PLATFORM], "\n"));
vm->stdout_write(fmt("[", sizeof(void*)*8, " bit] on ", kPlatformStrings[PK_SYS_PLATFORM], "\n"));
vm->stdout_write("https://github.com/blueloveTH/pocketpy" "\n");
vm->stdout_write("Type \"exit()\" to exit." "\n");
}

View File

@ -473,8 +473,8 @@ int utf8len(unsigned char c, bool suppress){
return (*this) << static_cast<i64>(val);
}
SStream& SStream::operator<<(unsigned long val){
// unsigned long could be out of range of `i64`, use `std::to_string` instead
SStream& SStream::operator<<(uint64_t val){
// uint64_t could be out of range of `i64`, use `std::to_string` instead
return (*this) << std::to_string(val);
}